mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
Add a []byte argument to hash.Hash to allow an allocation to be saved.
This is the result of running `gofix -r hashsum` over the tree, changing the hash function implementations by hand and then fixing a couple of instances where gofix didn't catch something. The changed implementations are as simple as possible while still working: I'm not trying to optimise in this CL. R=rsc, cw, rogpeppe CC=golang-dev https://golang.org/cl/5448065
This commit is contained in:
parent
2308aefc84
commit
bac7bc55a6
49 changed files with 202 additions and 200 deletions
|
|
@ -189,7 +189,7 @@ func main() {
|
|||
io.Copy(h, f)
|
||||
f.Close()
|
||||
}
|
||||
cPrefix = fmt.Sprintf("_%x", h.Sum()[0:6])
|
||||
cPrefix = fmt.Sprintf("_%x", h.Sum(nil)[0:6])
|
||||
|
||||
fs := make([]*File, len(goFiles))
|
||||
for i, input := range goFiles {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue