GO - global variable not accessible to methods when used with testing : I am facing problem while using Golang Testing.Global variable not accessible to methods.
Following is the code snippet

test1.go

    var map1 = make(map[string]string)

    func f()(req *http.Request) (ismime bool, map1 map[string]string, err 
    error) {
     map1["key"]="value"
    return true,map1,nil
    }

I am getting following error
    
    panic: assignment to entry in nil map [recovered]
    panic: assignment to entry in nil map

	