diff --git a/cmd/notary/util.go b/cmd/notary/util.go index 1a71f14b69..887204f088 100644 --- a/cmd/notary/util.go +++ b/cmd/notary/util.go @@ -12,7 +12,7 @@ func getPayload(t *tufCommander) ([]byte, error) { // Reads from the given file if t.input != "" { - // Please be noticed that ReadFile will cut off the size if it was over 1e9. + // Please note that ReadFile will cut off the size if it was over 1e9. // Thus, if the size of the file exceeds 1GB, the over part will not be // loaded into the buffer. payload, err := ioutil.ReadFile(t.input) @@ -33,7 +33,7 @@ func getPayload(t *tufCommander) ([]byte, error) { // feedback is a helper function to print the payload to a file or STDOUT or keep quiet // due to the value of flag "quiet" and "output". func feedback(t *tufCommander, payload []byte) error { - // We only get here when everythings goes well, since the flag "quiet" was + // We only get here when everything goes well, since the flag "quiet" was // provided, we output nothing but just return. if t.quiet { return nil @@ -41,9 +41,7 @@ func feedback(t *tufCommander, payload []byte) error { // Flag "quiet" was not "true", that's why we get here. if t.output != "" { - if err := ioutil.WriteFile(t.output, payload, 0644); err != nil { - return err - } + return ioutil.WriteFile(t.output, payload, 0644) } os.Stdout.Write(payload)