Skip to content

Commit

Permalink
Merge pull request #122 from thaJeztah/gofmt
Browse files Browse the repository at this point in the history
mountinfo, symlink: format source with go1.19
  • Loading branch information
thaJeztah authored Aug 29, 2022
2 parents 416188a + 84f96a1 commit 3e3e805
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions mountinfo/mountinfo_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ func PidMountInfo(pid int) ([]*Info, error) {
// A few specific characters in mountinfo path entries (root and mountpoint)
// are escaped using a backslash followed by a character's ascii code in octal.
//
// space -- as \040
// tab (aka \t) -- as \011
// newline (aka \n) -- as \012
// backslash (aka \\) -- as \134
// space -- as \040
// tab (aka \t) -- as \011
// newline (aka \n) -- as \012
// backslash (aka \\) -- as \134
//
// This function converts path from mountinfo back, i.e. it unescapes the above sequences.
func unescape(path string) (string, error) {
Expand Down
5 changes: 3 additions & 2 deletions symlink/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ func FollowSymlinkInScope(path, root string) (string, error) {
// Trying to break out from `root` does not constitute an error.
//
// Example:
// If /foo/bar -> /outside,
// FollowSymlinkInScope("/foo/bar", "/foo") == "/foo/outside" instead of "/outside"
//
// If /foo/bar -> /outside,
// FollowSymlinkInScope("/foo/bar", "/foo") == "/foo/outside" instead of "/outside"
//
// IMPORTANT: it is the caller's responsibility to call evalSymlinksInScope *after* relevant symlinks
// are created and not to create subsequently, additional symlinks that could potentially make a
Expand Down

0 comments on commit 3e3e805

Please sign in to comment.