mirror of
https://github.com/golang/go
synced 2024-11-05 14:46:11 -07:00
The Go programming language
5bc19071d3
- add tests for Open, ReadDir, and Stat funcs - add tests for Seek of Open() - simplify internal handling of absolute vs. "zip" paths - fix handling of "/" The fix special cases this scenario, leaving the codepath for all other file paths the same. Specifically, - Exported funcs call stat(), so stat("/") is handled by simply returning 0 to indicate all entries are (effectively) prefixed by "/" and zipFI{"", nil} because "/" has no name and nil indicates it is a directory. - ReadDir("/") is further handled by seeding the existing lookup logic with "" instead of what would have been "/". This is necessary because, per the zipfs spec, the zip file entries MUST NOT start with "/", so using "/" would incorrectly match nothing. This works because seeding lookup with "" (correctly) matches all files and then the following, existing logic (correctly) pares things down to just the files in the root directory; not in any subdirectories. Verified that godoc -zip still works. Fixes golang/go#12743 Change-Id: Icb5f01b8a29cefa4e2820135f318894042970301 Reviewed-on: https://go-review.googlesource.com/16925 Reviewed-by: Andrew Gerrand <adg@golang.org> |
||
---|---|---|
benchmark/parse | ||
blog | ||
cmd | ||
container/intsets | ||
cover | ||
go | ||
godoc | ||
imports | ||
oracle | ||
playground | ||
present | ||
refactor | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
codereview.cfg | ||
CONTRIBUTING.md | ||
CONTRIBUTORS | ||
LICENSE | ||
PATENTS | ||
README |
This subrepository holds the source for various packages and tools that support the Go programming language. Some of the tools, godoc and vet for example, are included in binary Go distributions. Others, including the Go oracle and the test coverage tool, can be fetched with "go get". Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs. To submit changes to this repository, see http://golang.org/doc/contribute.html.