Source File
oflag.go
Belonging Package
github.com/tetratelabs/wazero/internal/sysfs
package sysfsimport ()// toOsOpenFlag converts the input to the flag parameter of os.OpenFilefunc toOsOpenFlag( sys.Oflag) ( int) {// First flags are exclusiveswitch & (sys.O_RDONLY | sys.O_RDWR | sys.O_WRONLY) {case sys.O_RDONLY:|= os.O_RDONLYcase sys.O_RDWR:|= os.O_RDWRcase sys.O_WRONLY:|= os.O_WRONLY}// Run down the flags defined in the os packageif &sys.O_APPEND != 0 {|= os.O_APPEND}if &sys.O_CREAT != 0 {|= os.O_CREATE}if &sys.O_EXCL != 0 {|= os.O_EXCL}if &sys.O_SYNC != 0 {|= os.O_SYNC}if &sys.O_TRUNC != 0 {|= os.O_TRUNC}return withSyscallOflag(, )}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |