]> Cypherpunks repositories - gostls13.git/commitdiff
os: rearrange OpenFile Flags doc
authorIan Lance Taylor <iant@golang.org>
Wed, 1 Nov 2017 20:38:05 +0000 (13:38 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 1 Nov 2017 21:28:43 +0000 (21:28 +0000)
Updates #21322

Change-Id: Ib03ee9dbe1b44c2fecd51f2f2c23a88482158e7e
Reviewed-on: https://go-review.googlesource.com/75250
Reviewed-by: Rob Pike <r@golang.org>
src/os/file.go

index d842ce6ef0002692b213f1b2630166b501a171be..542b07447ff44bc56aedf690ca2300708e569f9d 100644 (file)
@@ -60,12 +60,13 @@ var (
 )
 
 // Flags to OpenFile wrapping those of the underlying system. Not all
-// flags may be implemented on a given system. Each call to OpenFile
-// should specify exactly one of O_RDONLY, O_WRONLY, or O_RDWR.
+// flags may be implemented on a given system.
 const (
+       // Exactly one of O_RDONLY, O_WRONLY, or O_RDWR must be specified.
        O_RDONLY int = syscall.O_RDONLY // open the file read-only.
        O_WRONLY int = syscall.O_WRONLY // open the file write-only.
        O_RDWR   int = syscall.O_RDWR   // open the file read-write.
+       // The remaining values may be or'ed in to control behavior.
        O_APPEND int = syscall.O_APPEND // append data to the file when writing.
        O_CREATE int = syscall.O_CREAT  // create a new file if none exists.
        O_EXCL   int = syscall.O_EXCL   // used with O_CREATE, file must not exist.