Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
b7627d3d
Commit
b7627d3d
authored
Aug 30, 2012
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
path: improve documentation for Dir
R=golang-dev, bradfitz CC=golang-dev
https://golang.org/cl/6495059
parent
e61c047c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
src/pkg/path/path.go
src/pkg/path/path.go
+2
-1
src/pkg/path/path_test.go
src/pkg/path/path_test.go
+1
-0
No files found.
src/pkg/path/path.go
View file @
b7627d3d
...
...
@@ -198,7 +198,8 @@ func IsAbs(path string) bool {
}
// Dir returns all but the last element of path, typically the path's directory.
// The path is Cleaned and trailing slashes are removed before processing.
// After dropping the final element using Split, the path is Cleaned and trailing
// slashes are removed.
// If the path is empty, Dir returns ".".
// If the path consists entirely of slashes followed by non-slash bytes, Dir
// returns a single slash. In any other case, the returned path does not end in a
...
...
src/pkg/path/path_test.go
View file @
b7627d3d
...
...
@@ -200,6 +200,7 @@ var dirtests = []PathTest{
{
"x/"
,
"x"
},
{
"abc"
,
"."
},
{
"abc/def"
,
"abc"
},
{
"abc////def"
,
"abc"
},
{
"a/b/.x"
,
"a/b"
},
{
"a/b/c."
,
"a/b"
},
{
"a/b/c.x"
,
"a/b"
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment