e.strings[s] = pos
e.Int(pos)
e.stringTable = binary.AppendUvarint(e.stringTable, uint64(len(s)))
- e.stringTable = append(e.stringTable, []byte(s)...)
+ e.stringTable = append(e.stringTable, s...)
}
func (e *encoder) Bool(b bool) {
}
switch {
case !sawSpace && !sawSingleQuote && !sawDoubleQuote:
- buf = append(buf, []byte(arg)...)
+ buf = append(buf, arg...)
case !sawSingleQuote:
buf = append(buf, '\'')
- buf = append(buf, []byte(arg)...)
+ buf = append(buf, arg...)
buf = append(buf, '\'')
case !sawDoubleQuote:
buf = append(buf, '"')
- buf = append(buf, []byte(arg)...)
+ buf = append(buf, arg...)
buf = append(buf, '"')
default:
func formatIDMappings(idMap []SysProcIDMap) []byte {
var data []byte
for _, im := range idMap {
- data = append(data, []byte(itoa.Itoa(im.ContainerID)+" "+itoa.Itoa(im.HostID)+" "+itoa.Itoa(im.Size)+"\n")...)
+ data = append(data, itoa.Itoa(im.ContainerID)+" "+itoa.Itoa(im.HostID)+" "+itoa.Itoa(im.Size)+"\n"...)
}
return data
}
// Of these, Location(loc.name) is the least disruptive. This is an edge
// case we hope not to hit too often.
buf = append(buf, `time.Location(`...)
- buf = append(buf, []byte(quote(loc.name))...)
+ buf = append(buf, quote(loc.name)...)
buf = append(buf, ')')
}
buf = append(buf, ')')