浏览代码

Don't panic when response is nil

Lu Stadler 7 年之前
父节点
当前提交
50a5c8eabf
共有 1 个文件被更改,包括 3 次插入0 次删除
  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 {