http-boot-server/bootserver/bootprotocol/helpers.go

14 lines
286 B
Go
Raw Permalink Normal View History

package bootprotocol
import "bytes"
var equalByte = []byte("=")
func splitKeyValue(param []byte) (key []byte, value []byte, err error) {
splitted := bytes.Split(param, equalByte)
if len(splitted) != 2 {
return nil, nil, ErrInvalidParam
}
return splitted[0], splitted[1], nil
}