diff options
Diffstat (limited to 'libgo/go/patch/textdiff.go')
-rw-r--r-- | libgo/go/patch/textdiff.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libgo/go/patch/textdiff.go b/libgo/go/patch/textdiff.go index 482bd67..adb629a 100644 --- a/libgo/go/patch/textdiff.go +++ b/libgo/go/patch/textdiff.go @@ -2,7 +2,7 @@ package patch import ( "bytes" - "os" + "errors" ) type TextDiff []TextChunk @@ -16,7 +16,7 @@ type TextChunk struct { New []byte } -func ParseTextDiff(raw []byte) (TextDiff, os.Error) { +func ParseTextDiff(raw []byte) (TextDiff, error) { var chunkHeader []byte // Copy raw so it is safe to keep references to slices. @@ -151,11 +151,11 @@ ErrChunkHdr: return nil, SyntaxError("unexpected chunk header line: " + string(chunkHeader)) } -var ErrPatchFailure = os.NewError("patch did not apply cleanly") +var ErrPatchFailure = errors.New("patch did not apply cleanly") // Apply applies the changes listed in the diff // to the data, returning the new version. -func (d TextDiff) Apply(data []byte) ([]byte, os.Error) { +func (d TextDiff) Apply(data []byte) ([]byte, error) { var buf bytes.Buffer line := 1 for _, c := range d { |