Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
Improve apifile error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Feb 14, 2019
1 parent 6bb2a28 commit 3393b83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apifile.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ func (it *apiIter) Next() bool {
}

if len(out.Objects) != 1 {
it.err = fmt.Errorf("len(out.Objects) != 1 (is %d)", len(out.Objects))
it.err = fmt.Errorf("ls returned more objects than expected (%d)", len(out.Objects))
return false
}

if len(out.Objects[0].Links) != 1 {
it.err = fmt.Errorf("len(out.Objects[0].Links) != 1 (is %d)", len(out.Objects[0].Links))
it.err = fmt.Errorf("ls returned more links than expected (%d)", len(out.Objects[0].Links))
return false
}

Expand Down

0 comments on commit 3393b83

Please sign in to comment.