diff options
Diffstat (limited to 'src/cmd/gofmt/doc.go')
-rw-r--r-- | src/cmd/gofmt/doc.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/gofmt/doc.go b/src/cmd/gofmt/doc.go index 9d0cd32862..805e5fbdcf 100644 --- a/src/cmd/gofmt/doc.go +++ b/src/cmd/gofmt/doc.go @@ -32,7 +32,8 @@ The flags are: -w Do not print reformatted sources to standard output. If a file's formatting is different from gofmt's, overwrite it - with gofmt's version. + with gofmt's version. If an error occured during overwriting, + the orginal file is restored from an automatic backup. Debugging support: -cpuprofile filename @@ -98,3 +99,5 @@ This may result in changes that are incompatible with earlier versions of Go. package main // BUG(rsc): The implementation of -r is a bit slow. +// BUG(gri): If -w fails, the restored original file may not have some of the +// original file attributes. |