diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-03 02:17:34 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-03 02:17:34 +0000 |
commit | 2fd401c8f190f1fe43e51a7f726f6ed6119a1f96 (patch) | |
tree | 7f76eff391f37fe6467ff4ffbc0c582c9959ea30 /libgo/go/patch/patch.go | |
parent | 02e9018f1616b23f1276151797216717b3564202 (diff) | |
download | gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.zip gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.tar.gz gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.tar.bz2 |
libgo: Update to weekly.2011-11-02.
From-SVN: r181964
Diffstat (limited to 'libgo/go/patch/patch.go')
-rw-r--r-- | libgo/go/patch/patch.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libgo/go/patch/patch.go b/libgo/go/patch/patch.go index fcc8307..1d804f3 100644 --- a/libgo/go/patch/patch.go +++ b/libgo/go/patch/patch.go @@ -9,7 +9,6 @@ package patch import ( "bytes" - "os" "path" "strings" ) @@ -47,7 +46,7 @@ type Diff interface { // Apply applies the changes listed in the diff // to the string s, returning the new version of the string. // Note that the string s need not be a text string. - Apply(old []byte) (new []byte, err os.Error) + Apply(old []byte) (new []byte, err error) } // NoDiff is a no-op Diff implementation: it passes the @@ -56,14 +55,14 @@ var NoDiff Diff = noDiffType(0) type noDiffType int -func (noDiffType) Apply(old []byte) ([]byte, os.Error) { +func (noDiffType) Apply(old []byte) ([]byte, error) { return old, nil } // A SyntaxError represents a syntax error encountered while parsing a patch. type SyntaxError string -func (e SyntaxError) String() string { return string(e) } +func (e SyntaxError) Error() string { return string(e) } var newline = []byte{'\n'} @@ -71,7 +70,7 @@ var newline = []byte{'\n'} // The patch text typically comprises a textual header and a sequence // of file patches, as would be generated by CVS, Subversion, // Mercurial, or Git. -func Parse(text []byte) (*Set, os.Error) { +func Parse(text []byte) (*Set, error) { // Split text into files. // CVS and Subversion begin new files with // Index: file name. |