Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for NewBytesWithCopyOf (4.96 sec)

  1. internal/grid/types.go

    // When returned as response, the handler also gives up ownership of the byte slice.
    func NewBytesWith(b []byte) *Bytes {
    	bb := Bytes(b)
    	return &bb
    }
    
    // NewBytesWithCopyOf returns a new byte slice with a copy of the provided content.
    func NewBytesWithCopyOf(b []byte) *Bytes {
    	if b == nil {
    		bb := Bytes(nil)
    		return &bb
    	}
    	bb := NewBytesCap(len(b))
    	*bb = append(*bb, b...)
    	return bb
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 01 23:42:09 GMT 2024
    - 15.4K bytes
    - Viewed (0)
Back to top