Skip to content

Commit

Permalink
edit: improved byte comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Menet committed Feb 28, 2020
1 parent 336c028 commit 0746f54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ func (a *App) editCmd(cmd *cobra.Command, args []string) {
edited, err := CaptureInputFromEditor(data)
exitOnErr(err)

if bytes.Compare(data, edited) == 0 {
if bytes.Equal(data, edited) {
fmt.Printf("nothing changed, done!\n")
continue
}
Expand Down

0 comments on commit 0746f54

Please sign in to comment.