aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/patch/patch.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/patch/patch.go')
-rw-r--r--libgo/go/patch/patch.go9
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.