commit | c343b6b2b81f9c6d4007c2c3c567dfaadd4fa4e6 | [log] [tgz] |
---|---|---|
author | Kevin Burke <kev@inburke.com> | Mon Dec 17 00:37:07 2018 +0000 |
committer | Brad Fitzpatrick <bradfitz@golang.org> | Tue Dec 18 21:17:16 2018 +0000 |
tree | 3909004789c9a167fcab2984a27634095856cf88 | |
parent | 7ef718f16fa05cd07bb0f7d22aa4bc57067de1f2 [diff] |
os: show how to print permission bits in octal Permission bits are most commonly viewed in string form (rwx-- etc) or in octal form (0755), but the latter is relatively rare in Go. Demonstrate how to print a FileMode in readable octal format. Change-Id: I41feb801bcecb5077d4eabafdea27c149fc179a1 Reviewed-on: https://go-review.googlesource.com/c/154423 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.