mirror of
https://github.com/golang/go
synced 2024-11-22 08:44:41 -07:00
The Go programming language
9364868a07
This is potentially an API-breaking change, but it is an important bug fix. The CL https://golang.org/cl/7305072/ added stuff to make the tar file look more like a file system internally, including providing an implementation of os.FileInfo for the file headers within the archive. But the code is incorrect because FileInfo.Name is supposed to return the base name only; this implementation returns the full path. A round trip test added in the same shows this in action, as the slashes are preserved as we create a header using the local implementation of FileInfo. The CL here changes the behavior of the tar (and zip) FileInfo to honor the Go spec for that interface. It also clarifies that the FileInfoHeader function, which takes a FileInfo as an argument, will therefore create a header with only the base name of the file recorded, and that subsequent adjustment may be necessary. There may be code out there that depends on the broken behavior. We can call out the risk in the release notes. Fixes #6180. R=golang-dev, dsymonds, adg, bradfitz CC=golang-dev https://golang.org/cl/13118043 |
||
---|---|---|
api | ||
doc | ||
include | ||
lib | ||
misc | ||
src | ||
test | ||
.hgignore | ||
.hgtags | ||
AUTHORS | ||
CONTRIBUTORS | ||
favicon.ico | ||
LICENSE | ||
PATENTS | ||
README | ||
robots.txt |
This is the source code repository for the Go programming language. For documentation about how to install and use Go, visit http://golang.org/ or load doc/install.html in your web browser. After installing Go, you can view a nicely formatted doc/install.html by running godoc --http=:6060 and then visiting http://localhost:6060/doc/install.html. Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file. -- Binary Distribution Notes If you have just untarred a binary Go distribution, you need to set the environment variable $GOROOT to the full path of the go directory (the one containing this README). You can omit the variable if you unpack it into /usr/local/go, or if you rebuild from sources by running all.bash (see doc/install.html). You should also add the Go binary directory $GOROOT/bin to your shell's path. For example, if you extracted the tar file into $HOME/go, you might put the following in your .profile: export GOROOT=$HOME/go export PATH=$PATH:$GOROOT/bin See doc/install.html for more details.