diff options
| author | Gustavo Niemeyer <gustavo@niemeyer.net> | 2012-02-03 00:16:18 -0200 |
|---|---|---|
| committer | Gustavo Niemeyer <gustavo@niemeyer.net> | 2012-02-03 00:16:18 -0200 |
| commit | 20f4385af0690b6f1c7a0ba5380f0b057a87485d (patch) | |
| tree | e244eaa16208e2f6dd6d9eb4057fdef4e30d7b3a /src/pkg/path/filepath | |
| parent | b9474de2bef8469a61b22ba17f18c28ab4c58fd8 (diff) | |
| download | go-20f4385af0690b6f1c7a0ba5380f0b057a87485d.tar.xz | |
os: turn FileStat.Sys into a method on FileInfo
This reduces the overhead necessary to work with OS-specific
file details, hides the implementation of FileStat, and
preserves the implementation-specific nature of Sys.
Expressions such as:
stat.(*os.FileInfo).Sys.(*syscall.Stat_t).Uid
fi1.(*os.FileStat).SameFile(fi2.(*os.FileStat))
Are now spelled as::
stat.Sys().(*syscall.Stat_t).Uid
os.SameFile(fi1, fi2)
R=cw, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5448079
Diffstat (limited to 'src/pkg/path/filepath')
| -rw-r--r-- | src/pkg/path/filepath/path_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/path/filepath/path_test.go b/src/pkg/path/filepath/path_test.go index 5b0630fdc9..a1b0c9d584 100644 --- a/src/pkg/path/filepath/path_test.go +++ b/src/pkg/path/filepath/path_test.go @@ -667,7 +667,7 @@ func TestAbs(t *testing.T) { continue } absinfo, err := os.Stat(abspath) - if err != nil || !absinfo.(*os.FileStat).SameFile(info.(*os.FileStat)) { + if err != nil || !os.SameFile(absinfo, info) { t.Errorf("Abs(%q)=%q, not the same file", path, abspath) } if !filepath.IsAbs(abspath) { |
