R=cemeyer, rsc
CC=golang-dev
https://golang.org/cl/809041
func (d Directive) Copy() Directive { return Directive(makeCopy(d)) }
-type readByter interface {
- ReadByte() (b byte, err os.Error)
-}
-
// CopyToken returns a copy of a Token.
func CopyToken(t Token) Token {
switch v := t.(type) {
//
Entity map[string]string
- r readByter
+ r io.ReadByter
buf bytes.Buffer
stk *stack
free *stack
// Assume that if reader has its own
// ReadByte, it's efficient enough.
// Otherwise, use bufio.
- if rb, ok := r.(readByter); ok {
+ if rb, ok := r.(io.ReadByter); ok {
p.r = rb
} else {
p.r = bufio.NewReader(r)