]> Cypherpunks repositories - gostls13.git/commitdiff
all: remove various unused unexported functions and constants.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Tue, 28 Feb 2012 20:48:03 +0000 (21:48 +0100)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Tue, 28 Feb 2012 20:48:03 +0000 (21:48 +0100)
R=golang-dev, minux.ma, rsc
CC=golang-dev, remy
https://golang.org/cl/5702050

src/pkg/archive/zip/reader.go
src/pkg/bufio/bufio.go
src/pkg/encoding/json/encode.go
src/pkg/net/http/lex.go
src/pkg/time/format.go
src/pkg/time/time.go

index 6a58c49f9acc124145962cc950620e0647400873..f3826dcc48da228d6f9f3f215de11a0d5363a828 100644 (file)
@@ -169,34 +169,6 @@ func (r *checksumReader) Read(b []byte) (n int, err error) {
 
 func (r *checksumReader) Close() error { return r.rc.Close() }
 
-func readFileHeader(f *File, r io.Reader) error {
-       var buf [fileHeaderLen]byte
-       if _, err := io.ReadFull(r, buf[:]); err != nil {
-               return err
-       }
-       b := readBuf(buf[:])
-       if sig := b.uint32(); sig != fileHeaderSignature {
-               return ErrFormat
-       }
-       f.ReaderVersion = b.uint16()
-       f.Flags = b.uint16()
-       f.Method = b.uint16()
-       f.ModifiedTime = b.uint16()
-       f.ModifiedDate = b.uint16()
-       f.CRC32 = b.uint32()
-       f.CompressedSize = b.uint32()
-       f.UncompressedSize = b.uint32()
-       filenameLen := int(b.uint16())
-       extraLen := int(b.uint16())
-       d := make([]byte, filenameLen+extraLen)
-       if _, err := io.ReadFull(r, d); err != nil {
-               return err
-       }
-       f.Name = string(d[:filenameLen])
-       f.Extra = d[filenameLen:]
-       return nil
-}
-
 // findBodyOffset does the minimum work to verify the file has a header
 // and returns the file body offset.
 func (f *File) findBodyOffset() (int64, error) {
index 6f3b1eec9713a200f42517f0d79e34c4e1b13f29..b44d0e7d167893c9f813f99ce736adf9fa34131c 100644 (file)
@@ -23,7 +23,6 @@ var (
        ErrInvalidUnreadRune = errors.New("bufio: invalid use of UnreadRune")
        ErrBufferFull        = errors.New("bufio: buffer full")
        ErrNegativeCount     = errors.New("bufio: negative count")
-       errInternal          = errors.New("bufio: internal error")
 )
 
 // Buffered input.
index 7f5deed94d6737b7dc93c3bcf32def81352ff219..f98071777f0e968b646710af0f91454d05289437 100644 (file)
@@ -189,11 +189,6 @@ func (e *MarshalerError) Error() string {
        return "json: error calling MarshalJSON for type " + e.Type.String() + ": " + e.Err.Error()
 }
 
-type interfaceOrPtrValue interface {
-       IsNil() bool
-       Elem() reflect.Value
-}
-
 var hex = "0123456789abcdef"
 
 // An encodeState encodes JSON into a bytes.Buffer.
index 93b67e701761285817db97f5bf3b154475777dae..ffb393ccf6ab9cada206f752a1d034778dfdfe22 100644 (file)
@@ -14,14 +14,6 @@ func isSeparator(c byte) bool {
        return false
 }
 
-func isSpace(c byte) bool {
-       switch c {
-       case ' ', '\t', '\r', '\n':
-               return true
-       }
-       return false
-}
-
 func isCtl(c byte) bool { return (0 <= c && c <= 31) || c == 127 }
 
 func isChar(c byte) bool { return 0 <= c && c <= 127 }
index ef6f1f335142c3b058713ea3c88c8cc9d508619f..ad52bab216f8545835a7aae71727ab08a67aa3fc 100644 (file)
@@ -6,14 +6,6 @@ package time
 
 import "errors"
 
-const (
-       numeric = iota
-       alphabetic
-       separator
-       plus
-       minus
-)
-
 // These are predefined layouts for use in Time.Format.
 // The standard time used in the layouts is:
 //     Mon Jan 2 15:04:05 MST 2006
index 1b8c76fcc4c129677afdc8380c101b8f283ba067..51d332ba0aa75f921c592b8ee14ad5e46836f92e 100644 (file)
@@ -767,10 +767,6 @@ func (t Time) UnixNano() int64 {
        return (t.sec+internalToUnix)*1e9 + int64(t.nsec)
 }
 
-type gobError string
-
-func (g gobError) Error() string { return string(g) }
-
 const timeGobVersion byte = 1
 
 // GobEncode implements the gob.GobEncoder interface.