diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-03 02:17:34 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-03 02:17:34 +0000 |
commit | 6692ad1d1b2710fc619d04aad2ae0668cc59f4db (patch) | |
tree | 7f76eff391f37fe6467ff4ffbc0c582c9959ea30 /libgo/go/patch/patch.go | |
parent | 96265ae6967d08ca35d36e87b7588c0c9e6e5cca (diff) | |
download | ppe42-gcc-6692ad1d1b2710fc619d04aad2ae0668cc59f4db.tar.gz ppe42-gcc-6692ad1d1b2710fc619d04aad2ae0668cc59f4db.zip |
libgo: Update to weekly.2011-11-02.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181964 138bc75d-0d04-0410-961f-82ee72b054a4
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 fcc8307e09c..1d804f3362e 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. |