aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/bytes/bytes_test.go
AgeCommit message (Collapse)Author
2009-11-18add bytes.IndexByte; common case we can make fast later.Rob Pike
also pick off the special case in strings.Index. don't want strings.IndexByte because the call site will very rarely need to allocate and we can handle the test in the code itself. bytes.IndexByte can avoid a common allocation. R=rsc CC=golang-dev https://golang.org/cl/156091
2009-11-18remove bytes.CopyRob Pike
replace all calls with calls to copy use copy in regexp and bytes.Buffer R=rsc CC=golang-dev https://golang.org/cl/157073
2009-11-16 An asked-for-in #go-nuts extension to quickly create a repeatedDavid G. Andersen
copy of a string or a byte array. strings.Repeat("-", 50) bytes.Repeat(b, 99) R=rsc https://golang.org/cl/155063
2009-11-15fix bug in bytes.Map and add test cases for Map in both strings and bytes ↵Rob Pike
packages. thanks to ulrik.sverdrup for the test case. Fixes #191. R=rsc CC=golang-dev https://golang.org/cl/155056
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer
rsc's algorithm - applied gofmt -w misc src - partial CL (remaining files in other CLs) R=rsc, r http://go/go-review/1024040
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer
R=rsc, r http://go/go-review/1025029
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-04bytes.SplitAfter and strings.SplitAfterRuss Cox
most common usage is: lines := strings.SplitAfter(text, "\n", 0) R=r http://go/go-review/1018042
2009-10-27files that are okay from the last gofmt roundRuss Cox
R=gri http://go/go-review/1015011
2009-10-08more lgtm files from gofmtRuss Cox
R=gri OCL=35485 CL=35488
2009-09-15more "declared and not used".Russ Cox
the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638
2009-09-13Add and AddByteRob Pike
R=rsc DELTA=83 (83 added, 0 deleted, 0 changed) OCL=34584 CL=34584
2009-09-01casing operations for byte arraysRob Pike
R=rsc DELTA=186 (181 added, 0 deleted, 5 changed) OCL=34203 CL=34203
2009-08-12convert low-level (used by testing) packages toRuss Cox
whole-package compilation. new Makefiles, tests now in separate package bytes flag fmt io math once os reflect strconv sync time utf8 delete import "xxx" in package xxx. inside package xxx, xxx is not declared anymore so s/xxx.//g delete file and package level forward declarations. note the new internal_test.go and sync and strconv to provide public access to internals during testing. the installed version of the package omits that file and thus does not open the internals to all clients. R=r OCL=33065 CL=33097
2009-06-29io.StringBytes -> strings.BytesRuss Cox
io.ByteBuffer -> bytes.Buffer left io.ByteBuffer stub around for now, for protocol compiler. R=r OCL=30861 CL=30872
2009-06-24Change strings.Split, bytes.Split to take a maximum substring count argument.David Symonds
R=rsc APPROVED=r DELTA=131 (39 added, 10 deleted, 82 changed) OCL=30669 CL=30723
2009-06-24make bytes.Copy both src- and dst- limitedRuss Cox
and return the number of bytes copied. R=r DELTA=18 (6 added, 0 deleted, 12 changed) OCL=30693 CL=30712
2009-06-09mv src/lib to src/pkgRob Pike
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102