浏览代码

Fix error when no responses file is given

Lu Stadler 7 年之前
父节点
当前提交
0b91d78f9f
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      go/fake-http/fake-http.go

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

@ -329,6 +329,9 @@ type Header struct {
329 329
330 330
// Load loads responses from the YAML file at path.
331 331
func (rs *Responses) Load(path string) {
332
	if path == "" {
333
		return
334
	}
332 335
	responses, err := rs.loadFile(path)
333 336
	if err != nil {
334 337
		log.Printf("Error: Parsing %s: %s", path, err)