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/textdiff.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/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 { |