Przeglądaj źródła

Don't panic when response is nil

Lu Stadler 7 lat temu
rodzic
commit
50a5c8eabf
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      go/fake-http/fake-http.go

+ 3 - 0
go/fake-http/fake-http.go

@ -80,6 +80,9 @@ func main() {
80 80
		} else {
81 81
			resp = respondWithStub(stub, w, req)
82 82
		}
83
		if resp == nil {
84
			return
85
		}
83 86
84 87
		e := requestLog.Log(req, resp)
85 88
		if flags.cache {