diff options
| author | Damien Neil <dneil@google.com> | 2024-07-24 10:29:13 -0700 |
|---|---|---|
| committer | Damien Neil <dneil@google.com> | 2024-07-24 18:24:15 +0000 |
| commit | 910e6b5fae7cbf84e4a3fcfa6739e20239080bcd (patch) | |
| tree | bb035d2b1bb39157686a5624d8aacbeff3f1c4e0 /src/os/example_test.go | |
| parent | 074f2761b5ff54c9c9d2e2a720abd29efa5474cc (diff) | |
| download | go-910e6b5fae7cbf84e4a3fcfa6739e20239080bcd.tar.xz | |
os: document CopyFS behavior for symlinks in destination
Also clarify the permissions of created files,
and note that CopyFS will not overwrite files.
Update a few places in documentation to use 0oXXX for octal consts.
For #62484
Change-Id: I208ed2bde250304bc7fac2b93963ba57037e791e
Reviewed-on: https://go-review.googlesource.com/c/go/+/600775
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/os/example_test.go')
| -rw-r--r-- | src/os/example_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os/example_test.go b/src/os/example_test.go index 7437a74cd0..c507d46c46 100644 --- a/src/os/example_test.go +++ b/src/os/example_test.go @@ -61,7 +61,7 @@ func ExampleFileMode() { log.Fatal(err) } - fmt.Printf("permissions: %#o\n", fi.Mode().Perm()) // 0400, 0777, etc. + fmt.Printf("permissions: %#o\n", fi.Mode().Perm()) // 0o400, 0o777, etc. switch mode := fi.Mode(); { case mode.IsRegular(): fmt.Println("regular file") |
