1
0
mirror of https://github.com/golang/go synced 2024-10-01 22:28:33 -06:00
Commit Graph

29 Commits

Author SHA1 Message Date
Muhammed Uluyol
1d40e2b14b Rewrite leftover references to plan9.bell-labs.com to 9p.io.
Change-Id: Iadb4aa016a7b361d01827787dbc59164d5d147f2
Reviewed-on: https://go-review.googlesource.com/20291
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-03-06 07:07:01 +00:00
Brad Fitzpatrick
5fea2ccc77 all: single space after period.
The tree's pretty inconsistent about single space vs double space
after a period in documentation. Make it consistently a single space,
per earlier decisions. This means contributors won't be confused by
misleading precedence.

This CL doesn't use go/doc to parse. It only addresses // comments.
It was generated with:

$ perl -i -npe 's,^(\s*// .+[a-z]\.)  +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.)  +([A-Z])')
$ go test go/doc -update

Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7
Reviewed-on: https://go-review.googlesource.com/20022
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Dave Day <djd@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-03-02 00:13:47 +00:00
Martin Möhrmann
fdd0179bb1 all: fix typos and spelling
Change-Id: Icd06d99c42b8299fd931c7da821e1f418684d913
Reviewed-on: https://go-review.googlesource.com/19829
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-24 18:42:29 +00:00
Shawn Smith
58ec5839cd all: fix typos
Change-Id: I6035941df8b0de6aeaf6c05df7257bcf6e9191fe
Reviewed-on: https://go-review.googlesource.com/19320
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-23 13:58:47 +00:00
Nathan VanBenschoten
b04f3b06ec all: replace strings.Index with strings.Contains where possible
Change-Id: Ia613f1c37bfce800ece0533a5326fca91d99a66a
Reviewed-on: https://go-review.googlesource.com/18120
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
2016-02-19 01:06:05 +00:00
Alex Brainman
3540376b70 path/filepath: include test number in TestIssue13582 output
Otherwise it's hard to tell the difference between
link1 and link2 or other tests.

Change-Id: I36c153cccb10959535595938dfbc49db930b9fac
Reviewed-on: https://go-review.googlesource.com/17851
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-12-15 06:43:35 +00:00
Alex Brainman
61eb7058d0 path/filepath: keep walking if EvalSymlinks returns symlink
Fixes #13582

Change-Id: I220f3c7b9511b3c080874f5c42f2a431fdddcbb7
Reviewed-on: https://go-review.googlesource.com/17794
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-14 17:21:16 +00:00
Alex Brainman
2fb931d08f path/filepath: remove code working around Join bug
EvalSymlinks code assumes that Join has a bug
(see issue #11551 for details). But issue #11551 has
been fixed. Remove the workaround so it does not
confuses us when we read code next time.

Change-Id: I06bea20189f01f9922237c05516847353d8e4736
Reviewed-on: https://go-review.googlesource.com/17620
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-12-09 06:10:46 +00:00
Alex Brainman
51a112fefc path/filepath: handle c: as first parameter in Join properly
This is CL 11882 brought back to life.

Fixes #11551

Change-Id: I29810183957745442d1e9937f56a66fc9c6cc82a
Reviewed-on: https://go-review.googlesource.com/17470
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-12-06 06:11:09 +00:00
Mohit Agarwal
2619dccf3c path/filepath: in Rel use case-insensitive comparison on Windows
Compare basepath and targetpath using strings.EqualFold.  The absence
of this on Windows causes an unterminating condition in `for` statement
later in the function.

Fixes #13258

Change-Id: Ib5a0caba864ee425dc75ece47b9cf6fb626f47f1
Reviewed-on: https://go-review.googlesource.com/16857
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2015-11-17 23:48:47 +00:00
Mohit Agarwal
e0e4ccb51a path/filepath: include the original paths in error messages
On Windows, Rel emits error messages of the form `Rel: can't make
\windows relative to \windows`. Rather than emitting paths after
stripping volume names, emit the original paths so as to make those of
the form `Rel: can't make d:\windows relative to c:\windows`.  Fixed a
test that expected the error message to emit clean path instead of the
original.

Fixes #13259

Change-Id: I3a9bd5b137205f22794ec8046b4e917ee48cf750
Reviewed-on: https://go-review.googlesource.com/16858
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2015-11-17 23:46:38 +00:00
Yasuhiro Matsumoto
935faf3be2 path/filepath: in Rel use case-insensitive comparison on Windows
Fixes #10802

Compare Volume name and each path elements using strings.EqualFold.

Change-Id: Ibdefdb801d0326e53755bc9cc8c10eed998094e5
Reviewed-on: https://go-review.googlesource.com/16795
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-12 19:58:37 +00:00
Alex Brainman
3d5163cf43 path/filepath: fix EvalSymlinks(".") on windows
Also new tests added. So, perhaps, this CL corrects
even more broken EvalSymlinks behaviour.

Fixes #12451

Change-Id: I81b9d92bab74bcb8eca6db6633546982fe5cec87
Reviewed-on: https://go-review.googlesource.com/16192
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-11-01 04:45:37 +00:00
Alex Brainman
72193c9824 path/filepath: test EvalSymlinks returns canonical path on windows
When you create C:\A.TXT file on windows, you can open it as c:\a.txt.
EvalSymlinks("c:\a.txt") returns C:\A.TXT. This is all EvalSymlinks
did in the past, but recently symlinks functionality been implemented on
some Windows version (where symlinks are supported). So now EvalSymlinks
handles both: searching for file canonical name and resolving symlinks.

Unfortunately TestEvalSymlinks has not been adjusted properly. The test
tests either canonical paths or symlinks, but not both. This CL separates
canonical paths tests into new TestEvalSymlinksCanonicalNames, so all
functionality is covered. Tests are simplified somewhat too.

Also remove EvalSymlinksAbsWindowsTests - it seems not used anywhere.

Change-Id: Id12e9f1441c1e30f15c523b250469978e4511a84
Reviewed-on: https://go-review.googlesource.com/14412
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-10-22 04:35:50 +00:00
Hyang-Ah Hana Kim
460568b6fd path/filepath: disable symlink tests on android.
Same reason as https://go-review.googlesource.com/#/c/16115/

For golang/go#10807

Change-Id: Id0c404e9feb963f39a111fc317c9787692516ae1
Reviewed-on: https://go-review.googlesource.com/16116
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-10-20 22:18:43 +00:00
Rob Pike
f62b749ae2 all: fix some vet-caught formatting errors, mostly but not only in tests
Could go in 1.5, although not critical.
See also #12107

Change-Id: I7f1608b58581d21df4db58f0db654fef79e33a90
Reviewed-on: https://go-review.googlesource.com/13481
Reviewed-by: Dave Cheney <dave@cheney.net>
2015-08-21 05:37:36 +00:00
Brad Fitzpatrick
2ae77376f7 all: link to https instead of http
The one in misc/makerelease/makerelease.go is particularly bad and
probably warrants rotating our keys.

I didn't update old weekly notes, and reverted some changes involving
test code for now, since we're late in the Go 1.5 freeze. Otherwise,
the rest are all auto-generated changes, and all manually reviewed.

Change-Id: Ia2753576ab5d64826a167d259f48a2f50508792d
Reviewed-on: https://go-review.googlesource.com/12048
Reviewed-by: Rob Pike <r@golang.org>
2015-07-11 14:36:33 +00:00
Russ Cox
4df6b1ec2f path/filepath: document and test behavior of SkipDir on files
This behavior is not what we might have designed from the start,
but it has been present since Go 1. Rather than make a visible
behavioral change that might cause programs to work differently
in Go ≤1.4 vs Go ≥1.5, document what SkipDir on a non-directory
has always meant. If code doesn't want this meaning, it is easy
enough not to return SkipDir on non-directories.

Fixes #10533.

Change-Id: Ic0612f032044bc7c69bf62583a02037e4b47530b
Reviewed-on: https://go-review.googlesource.com/11690
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2015-06-29 21:16:35 +00:00
David Crawshaw
8c5f66bce4 path/filepath: skip test on darwin/arm64
Just like darwin/arm.

Change-Id: I4b0ab4a104f2c8a821ca8b5fa8d266e51883709f
Reviewed-on: https://go-review.googlesource.com/8816
Reviewed-by: Minux Ma <minux@golang.org>
2015-04-13 11:52:46 +00:00
Alex Brainman
32e75bace0 all: fix race when allocating buffer for some windows syscalls
Fixes #9753

Change-Id: I6c641ed7ef4f687a108e7d937ab4b9c24d5baf5d
Reviewed-on: https://go-review.googlesource.com/4940
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-04-08 02:06:31 +00:00
Josh Bleecher Snyder
2adc4e8927 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 <r@golang.org>
2015-03-18 15:14:06 +00:00
Hyang-Ah (Hana) Kim
eb96bb1992 path/filepath: clarify the package doc about '/' in returned results.
The slash is replaced with os.PathSeparator before returning.
Split, SplitList are the exceptions; comments for them mention this.

Fixes golang/go#10122.

Change-Id: I66dbee8d09f378582e046be8df309a3930151820
Reviewed-on: https://go-review.googlesource.com/7310
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Rob Pike <r@golang.org>
2015-03-11 20:25:35 +00:00
David Crawshaw
5432b4d346 path/filepath: get tests working on darwin/arm
Change-Id: Ic44d7837aaec58601e5d9cad8da5b958a809f4a0
Reviewed-on: https://go-review.googlesource.com/6400
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-03-01 18:38:21 +00:00
Andrew Gerrand
5868ce3519 path/filepath: add example for filepath.Split
Fixes #9928

Change-Id: Iab37051078755a132f211ad48e756422f7c55a39
Reviewed-on: https://go-review.googlesource.com/5416
Reviewed-by: Minux Ma <minux@golang.org>
2015-02-20 07:35:57 +00:00
Péter Surányi
9b6ccb1323 all: don't refer to code.google.com/p/go{,-wiki}/
Only documentation / comment changes. Update references to
point to golang.org permalinks or go.googlesource.com/go.
References in historical release notes under doc are left as is.

Change-Id: Icfc14e4998723e2c2d48f9877a91c5abef6794ea
Reviewed-on: https://go-review.googlesource.com/4060
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-02-06 14:41:47 +00:00
Emil Hessman
8128b0116d path/filepath: make Join handle UNC paths on Windows
Unless the first element is a Universal Naming Convention (UNC)[0]
path, Join shouldn't create a UNC path on Windows.

For example, Join inadvertently creates a UNC path on Windows when
told to join at least three non-empty path elements, where the first
element is `\` or `/`.

This CL prevents creation of a UNC path prefix when the first path
element isn't a UNC path.

Since this introduces some amount of Windows-specific logic, Join is
moved to a per GOOS implementation.

Fixes #9167.

[0]: http://msdn.microsoft.com/en-us/library/gg465305.aspx

Change-Id: Ib6eda597106cb025137673b33c4828df1367f75b
Reviewed-on: https://go-review.googlesource.com/2211
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2015-01-20 23:23:01 +00:00
Emil Hessman
ddd666b122 path/filepath: remove named result parameter for VolumeName
Fix style by removing unnecessary named result parameter.

Fix doc comment while here.

Change-Id: If8394e696ab37e00a95484d5137955aa06c59520
Reviewed-on: https://go-review.googlesource.com/1781
Reviewed-by: Yasuhiro MATSUMOTO <mattn.jp@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2014-12-18 16:05:07 +00:00
Russ Cox
54b63f0647 path/filepath: document that Glob ignores i/o errors
Fixes #8008.

LGTM=adg
R=golang-codereviews, nightlyone, adg
CC=golang-codereviews
https://golang.org/cl/138630045
2014-09-18 21:50:22 -04:00
Russ Cox
c007ce824d build: move package sources from src/pkg to src
Preparation was in CL 134570043.
This CL contains only the effect of 'hg mv src/pkg/* src'.
For more about the move, see golang.org/s/go14nopkg.
2014-09-08 00:08:51 -04:00