3

golang openfile 权限 0777

 9 months ago
source link: https://zhangyiming748.github.io/post/golang_openfile_why_0777/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

golang openfile 权限 0777

2023-11-23 Golang

func of() {
	os.OpenFile("name", os.O_APPEND|os.O_CREATE|os.O_RDWR, 0777)
	// 其中 0 代表八进制数字的前缀标记
	num := 10 + 010 + 0xf
	fmt.Println(num)
}

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK