1
0
mirror of https://github.com/golang/go synced 2024-11-19 08:54:47 -07:00

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 <gri@golang.org>
This commit is contained in:
Ian Lance Taylor 2017-10-30 16:31:57 -07:00
parent c280126557
commit 94d9371780

View File

@ -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.