Skip to content

Commit

Permalink
osutil: fix a few typos in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
joonas-fi authored Nov 23, 2023
1 parent 355fe20 commit 3fd96a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions os/osutil/writefileatomic.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func WriteFileAtomicFromReader(filename string, content io.Reader, options ...Wr
// - write all requested content to it (content produced by callback)
// - rename temp filename to filename if everything went OK
//
// If encountering any errors, remove the partial file
// If encountering any errors, removes the partial file
func WriteFileAtomic(filename string, produce func(io.Writer) error, options ...WriteFileOption) error {
opts := writeFileOptions{}
for _, option := range options {
Expand Down Expand Up @@ -74,7 +74,7 @@ func WriteFileAtomic(filename string, produce func(io.Writer) error, options ...
return err
}

if opts.atime != nil { // Chtimes() can't be done on the handle so this has to be done after Close()
if opts.atime != nil { // Chtimes() can't be done on the file handle so this has to be done after Close()
if err := os.Chtimes(filenameTemp, *opts.atime, *opts.mtime); err != nil {
return err
}
Expand Down

0 comments on commit 3fd96a2

Please sign in to comment.