// Set copies the given []byte v into b. If v is of length zero, b will be
// nulled.
Set copies the given []byte v into b. If v is of length zero, b will be
nulled.
// Set copies the given [] byte v into b . If v is of length zero b will be // nulled .
func (b *ByteSlice) Set(v []byte) {
	if v == nil {
		b.ByteSlice = nil
		b.Valid = false
		return
	}
	if !b.Valid {
		b.ByteSlice = []byte{}
		b.Valid = true
	}
	b.ByteSlice = append(b.ByteSlice[0:0], v...)
	b.Valid = true
}
func ( b * ByteSlice ) Set ( v [ ] byte ) { if v == nil { b . ByteSlice = nil b . Valid = false return } if ! b . Valid { b . ByteSlice = [ ] byte { } b . Valid = true } b . ByteSlice = append ( b . ByteSlice [ 0 : 0 ] , v ... ) b . Valid = true }
Set copies the given []byte v into b.
Set copies the given [] byte v into b .
// Make sure Set initializes null ByteSlices. // If b.ByteSlice is nil and len(v) == 0, b.ByteSlice would remain nil. We // don't want to that.