Explorar el Código

Make unnecessarily global variable local

Lu Stadler %!s(int64=7) %!d(string=hace) años
padre
commit
51cb636717
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      go/fake-http/fake-http.go

+ 2 - 2
go/fake-http/fake-http.go

39
	flag.BoolVar(&flags.proxyMinikube, "proxy-minikube", false, "Shortcut for -proxy-url https://$(minikube ip):8443 -proxy-client-cert ~/.minikube/client.crt -proxy-client-key ~/.minikube/client.key")
39
	flag.BoolVar(&flags.proxyMinikube, "proxy-minikube", false, "Shortcut for -proxy-url https://$(minikube ip):8443 -proxy-client-cert ~/.minikube/client.crt -proxy-client-key ~/.minikube/client.key")
40
}
40
}
41
41
42
var responses Responses
43
44
func main() {
42
func main() {
45
	flag.Parse()
43
	flag.Parse()
46
44
56
		responsesPath = flag.Arg(0)
54
		responsesPath = flag.Arg(0)
57
	}
55
	}
58
56
57
	var responses Responses
59
	requestLog := Log(make([]LogEntry, 0))
58
	requestLog := Log(make([]LogEntry, 0))
60
59
61
	http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
60
	http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
361
		return nil, err
360
		return nil, err
362
	}
361
	}
363
362
363
	var responses Responses
364
	err = yaml.Unmarshal(out, &responses)
364
	err = yaml.Unmarshal(out, &responses)
365
	if err != nil {
365
	if err != nil {
366
		return nil, err
366
		return nil, err