Skip to content

Commit

Permalink
Fix error output for etcd-import and etcd-edit
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Persson committed Sep 28, 2015
1 parent 344bef9 commit d1bdaad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/github.com/mickep76/etcd-edit/etcd-edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ EDIT:

if !result.Valid() {
for _, e := range result.Errors() {
fmt.Printf(" - %s: %s\n", e.Field(), e.Description())
fmt.Printf("%s: %s\n", strings.Replace(e.Context().String("/"), "(root)", *dir, 1), e.Description())
}

fmt.Printf("Do you want to correct the changes? [yes|no]")
Expand Down
2 changes: 1 addition & 1 deletion src/github.com/mickep76/etcd-import/etcd-import.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func main() {

if !result.Valid() {
for _, e := range result.Errors() {
fmt.Printf(" - %s: %s\n", e.Field(), e.Description())
fmt.Printf("%s: %s\n", strings.Replace(e.Context().String("/"), "(root)", *dir, 1), e.Description())
}
os.Exit(1)
}
Expand Down

0 comments on commit d1bdaad

Please sign in to comment.