]> Cypherpunks.ru repositories - gostls13.git/commit
os: document Readlink behavior for relative links
authorBryan C. Mills <bcmills@google.com>
Mon, 4 Dec 2023 20:32:01 +0000 (15:32 -0500)
committerGopher Robot <gobot@golang.org>
Thu, 7 Dec 2023 17:27:54 +0000 (17:27 +0000)
commitbb34112d4df7b5dfd12fc83b8d1305631a7b8708
treedf6e817d1136455672b11f491019bd728459d260
parent4601857c1c7f5f72c75366763ff71fdcbe5f84be
os: document Readlink behavior for relative links

Also provide a runnable example to illustrate that behavior.

This should help users to avoid the common mistake of expecting
os.Readlink to return an absolute path.

Fixes #57766.

Change-Id: I8f60aa111ebda0cae985758615019aaf26d5cb41
Reviewed-on: https://go-review.googlesource.com/c/go/+/546995
Auto-Submit: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/os/example_test.go
src/os/file.go
src/os/file_plan9.go
src/os/file_unix.go
src/os/file_windows.go