- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for isDotSlash (0.13 sec)
-
src/cmd/doc/main.go
// of error is minute and even on Windows people will use ./ // sometimes. var dotPaths = []string{ `./`, `../`, `.\`, `..\`, } // isDotSlash reports whether the path begins with a reference // to the local . or .. directory. func isDotSlash(arg string) bool { if arg == "." || arg == ".." { return true } for _, dotPath := range dotPaths { if strings.HasPrefix(arg, dotPath) { return true
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 12.2K bytes - Viewed (0) -
src/cmd/doc/doc_test.go
{`../`, true}, {`..\`, true}, {`../x`, true}, {`..\x`, true}, } func TestIsDotSlashPath(t *testing.T) { for _, test := range isDotSlashTests { if result := isDotSlash(test.str); result != test.result { t.Errorf("isDotSlash(%q) = %t; expected %t", test.str, result, test.result) } } } type test struct { name string args []string // Arguments to "[go] doc".
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 07 19:16:55 UTC 2023 - 31.2K bytes - Viewed (0)