1
0
mirror of https://github.com/golang/go synced 2024-11-14 14:20:30 -07:00

all: remove various unused unexported functions and constants.

R=golang-dev, minux.ma, rsc
CC=golang-dev, remy
https://golang.org/cl/5702050
This commit is contained in:
Rémy Oudompheng 2012-02-28 21:48:03 +01:00
parent 250fa82122
commit c10f50859e
6 changed files with 0 additions and 54 deletions

View 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 (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 // findBodyOffset does the minimum work to verify the file has a header
// and returns the file body offset. // and returns the file body offset.
func (f *File) findBodyOffset() (int64, error) { func (f *File) findBodyOffset() (int64, error) {

View File

@ -23,7 +23,6 @@ var (
ErrInvalidUnreadRune = errors.New("bufio: invalid use of UnreadRune") ErrInvalidUnreadRune = errors.New("bufio: invalid use of UnreadRune")
ErrBufferFull = errors.New("bufio: buffer full") ErrBufferFull = errors.New("bufio: buffer full")
ErrNegativeCount = errors.New("bufio: negative count") ErrNegativeCount = errors.New("bufio: negative count")
errInternal = errors.New("bufio: internal error")
) )
// Buffered input. // Buffered input.

View File

@ -189,11 +189,6 @@ func (e *MarshalerError) Error() string {
return "json: error calling MarshalJSON for type " + e.Type.String() + ": " + e.Err.Error() return "json: error calling MarshalJSON for type " + e.Type.String() + ": " + e.Err.Error()
} }
type interfaceOrPtrValue interface {
IsNil() bool
Elem() reflect.Value
}
var hex = "0123456789abcdef" var hex = "0123456789abcdef"
// An encodeState encodes JSON into a bytes.Buffer. // An encodeState encodes JSON into a bytes.Buffer.

View File

@ -14,14 +14,6 @@ func isSeparator(c byte) bool {
return false 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 isCtl(c byte) bool { return (0 <= c && c <= 31) || c == 127 }
func isChar(c byte) bool { return 0 <= c && c <= 127 } func isChar(c byte) bool { return 0 <= c && c <= 127 }

View File

@ -6,14 +6,6 @@ package time
import "errors" import "errors"
const (
numeric = iota
alphabetic
separator
plus
minus
)
// These are predefined layouts for use in Time.Format. // These are predefined layouts for use in Time.Format.
// The standard time used in the layouts is: // The standard time used in the layouts is:
// Mon Jan 2 15:04:05 MST 2006 // Mon Jan 2 15:04:05 MST 2006

View File

@ -767,10 +767,6 @@ func (t Time) UnixNano() int64 {
return (t.sec+internalToUnix)*1e9 + int64(t.nsec) return (t.sec+internalToUnix)*1e9 + int64(t.nsec)
} }
type gobError string
func (g gobError) Error() string { return string(g) }
const timeGobVersion byte = 1 const timeGobVersion byte = 1
// GobEncode implements the gob.GobEncoder interface. // GobEncode implements the gob.GobEncoder interface.