summaryrefslogtreecommitdiff
path: root/src/pkg/compress
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/compress')
-rw-r--r--src/pkg/compress/gzip/gunzip.go4
-rw-r--r--src/pkg/compress/lzw/reader_test.go2
-rw-r--r--src/pkg/compress/zlib/reader.go6
3 files changed, 6 insertions, 6 deletions
diff --git a/src/pkg/compress/gzip/gunzip.go b/src/pkg/compress/gzip/gunzip.go
index b0ddc81d2..6ac9293d7 100644
--- a/src/pkg/compress/gzip/gunzip.go
+++ b/src/pkg/compress/gzip/gunzip.go
@@ -36,8 +36,8 @@ func makeReader(r io.Reader) flate.Reader {
return bufio.NewReader(r)
}
-var HeaderError os.Error = os.ErrorString("invalid gzip header")
-var ChecksumError os.Error = os.ErrorString("gzip checksum error")
+var HeaderError = os.NewError("invalid gzip header")
+var ChecksumError = os.NewError("gzip checksum error")
// The gzip file stores a header giving metadata about the compressed file.
// That header is exposed as the fields of the Compressor and Decompressor structs.
diff --git a/src/pkg/compress/lzw/reader_test.go b/src/pkg/compress/lzw/reader_test.go
index 72121a6b5..f8042b0d1 100644
--- a/src/pkg/compress/lzw/reader_test.go
+++ b/src/pkg/compress/lzw/reader_test.go
@@ -84,7 +84,7 @@ var lzwTests = []lzwTest{
func TestReader(t *testing.T) {
b := bytes.NewBuffer(nil)
for _, tt := range lzwTests {
- d := strings.Split(tt.desc, ";", -1)
+ d := strings.Split(tt.desc, ";")
var order Order
switch d[1] {
case "LSB":
diff --git a/src/pkg/compress/zlib/reader.go b/src/pkg/compress/zlib/reader.go
index 8a3ef1580..78dabdf4d 100644
--- a/src/pkg/compress/zlib/reader.go
+++ b/src/pkg/compress/zlib/reader.go
@@ -34,9 +34,9 @@ import (
const zlibDeflate = 8
-var ChecksumError os.Error = os.ErrorString("zlib checksum error")
-var HeaderError os.Error = os.ErrorString("invalid zlib header")
-var DictionaryError os.Error = os.ErrorString("invalid zlib dictionary")
+var ChecksumError = os.NewError("zlib checksum error")
+var HeaderError = os.NewError("invalid zlib header")
+var DictionaryError = os.NewError("invalid zlib dictionary")
type reader struct {
r flate.Reader