From 2adc4e892704bb99f2d16c0c09777987cb6bed35 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Tue, 17 Feb 2015 15:44:42 -0800 Subject: all: use "reports whether" in place of "returns true if(f)" Comment changes only. Change-Id: I56848814564c4aa0988b451df18bebdfc88d6d94 Reviewed-on: https://go-review.googlesource.com/7721 Reviewed-by: Rob Pike --- src/path/filepath/match.go | 4 ++-- src/path/filepath/path_plan9.go | 2 +- src/path/filepath/path_unix.go | 2 +- src/path/filepath/path_windows.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/path/filepath') diff --git a/src/path/filepath/match.go b/src/path/filepath/match.go index ecc07aa5da..89f16de355 100644 --- a/src/path/filepath/match.go +++ b/src/path/filepath/match.go @@ -16,7 +16,7 @@ import ( // ErrBadPattern indicates a globbing pattern was malformed. var ErrBadPattern = errors.New("syntax error in pattern") -// Match returns true if name matches the shell file name pattern. +// Match reports whether name matches the shell file name pattern. // The pattern syntax is: // // pattern: @@ -301,7 +301,7 @@ func glob(dir, pattern string, matches []string) (m []string, e error) { return } -// hasMeta returns true if path contains any of the magic characters +// hasMeta reports whether path contains any of the magic characters // recognized by Match. func hasMeta(path string) bool { // TODO(niemeyer): Should other magic characters be added here? diff --git a/src/path/filepath/path_plan9.go b/src/path/filepath/path_plan9.go index da5f5fdac7..962774efd5 100644 --- a/src/path/filepath/path_plan9.go +++ b/src/path/filepath/path_plan9.go @@ -6,7 +6,7 @@ package filepath import "strings" -// IsAbs returns true if the path is absolute. +// IsAbs reports whether the path is absolute. func IsAbs(path string) bool { return strings.HasPrefix(path, "/") || strings.HasPrefix(path, "#") } diff --git a/src/path/filepath/path_unix.go b/src/path/filepath/path_unix.go index 008b76e19e..d241d78fa7 100644 --- a/src/path/filepath/path_unix.go +++ b/src/path/filepath/path_unix.go @@ -8,7 +8,7 @@ package filepath import "strings" -// IsAbs returns true if the path is absolute. +// IsAbs reports whether the path is absolute. func IsAbs(path string) bool { return strings.HasPrefix(path, "/") } diff --git a/src/path/filepath/path_windows.go b/src/path/filepath/path_windows.go index d6ed3d142d..bcfe0a34b0 100644 --- a/src/path/filepath/path_windows.go +++ b/src/path/filepath/path_windows.go @@ -13,7 +13,7 @@ func isSlash(c uint8) bool { return c == '\\' || c == '/' } -// IsAbs returns true if the path is absolute. +// IsAbs reports whether the path is absolute. func IsAbs(path string) (b bool) { l := volumeNameLen(path) if l == 0 { @@ -141,7 +141,7 @@ func joinNonEmpty(elem []string) string { return head + string(Separator) + tail } -// isUNC returns true if path is a UNC path. +// isUNC reports whether path is a UNC path. func isUNC(path string) bool { return volumeNameLen(path) > 2 } -- cgit v1.3