Sfoglia il codice sorgente

Fix error when no responses file is given

Lu Stadler 7 anni fa
parent
commit
0b91d78f9f
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  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)