From: Ian Lance Taylor Date: Mon, 30 Oct 2017 23:31:57 +0000 (-0700) Subject: os: clarify that OpenFile reqires one of O_RDONLY/O_WRONLY/O_RDWR X-Git-Tag: go1.10beta1~523 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=94d937178039a8f8754dcba8e1d9d491cb7bebfc;p=gostls13.git os: clarify that OpenFile reqires one of O_RDONLY/O_WRONLY/O_RDWR Fixes #21322. Change-Id: Ia589c576be0b5cdb7cde5d35cd857ad7c93c372b Reviewed-on: https://go-review.googlesource.com/74550 Reviewed-by: Robert Griesemer --- diff --git a/src/os/file.go b/src/os/file.go index 1fc4cf34da..d842ce6ef0 100644 --- a/src/os/file.go +++ b/src/os/file.go @@ -60,7 +60,8 @@ var ( ) // Flags to OpenFile wrapping those of the underlying system. Not all -// flags may be implemented on a given system. +// flags may be implemented on a given system. Each call to OpenFile +// should specify exactly one of O_RDONLY, O_WRONLY, or O_RDWR. const ( O_RDONLY int = syscall.O_RDONLY // open the file read-only. O_WRONLY int = syscall.O_WRONLY // open the file write-only.