package zapjournal
import (
)
func ( []byte, complex128, byte, , int) []byte {
if != 64 && != 128 {
panic("invalid bitSize")
}
>>= 1
= append(, '(')
= strconv.AppendFloat(, real(), , , )
:= imag()
if math.IsNaN() || (!math.IsInf(, 0) && > 0) {
= append(, '+')
}
= strconv.AppendFloat(, , , , )
= append(, 'i', ')')
return
}
func ( []byte, uintptr) []byte {
= append(, []byte("0x")...)
= strconv.AppendUint(, uint64(), 16)
return
}
func ( *base64.Encoding, , []byte) []byte {
:= len()
:= .EncodedLen(len())
if cap()- < {
= append(, make([]byte, )...)
} else {
= [:+]
}
.Encode([:], )
return
}