Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(16)

Side by Side Diff: src/pkg/patch/patch.go

Issue 4661051: code review 4661051: strings.Split: make the default to split all. (Closed)
Patch Set: diff -r eaa696629d4d https://go.googlecode.com/hg/ Created 12 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/mime/mediatype.go ('k') | src/pkg/path/filepath/path.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // Package patch implements parsing and execution of the textual and 5 // Package patch implements parsing and execution of the textual and
6 // binary patch descriptions used by version control tools such as 6 // binary patch descriptions used by version control tools such as
7 // CVS, Git, Mercurial, and Subversion. 7 // CVS, Git, Mercurial, and Subversion.
8 package patch 8 package patch
9 9
10 import ( 10 import (
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 } 312 }
313 313
314 // hasPrefix returns true if s begins with t. 314 // hasPrefix returns true if s begins with t.
315 func hasPrefix(s []byte, t string) bool { 315 func hasPrefix(s []byte, t string) bool {
316 _, ok := skip(s, t) 316 _, ok := skip(s, t)
317 return ok 317 return ok
318 } 318 }
319 319
320 // splitLines returns the result of splitting s into lines. 320 // splitLines returns the result of splitting s into lines.
321 // The \n on each line is preserved. 321 // The \n on each line is preserved.
322 func splitLines(s []byte) [][]byte { return bytes.SplitAfter(s, newline, -1) } 322 func splitLines(s []byte) [][]byte { return bytes.SplitAfter(s, newline) }
OLDNEW
« no previous file with comments | « src/pkg/mime/mediatype.go ('k') | src/pkg/path/filepath/path.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b