Pārlūkot izejas kodu

Fix error when no responses file is given

Lu Stadler 7 gadi atpakaļ
vecāks
revīzija
0b91d78f9f
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  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)