14 lines
286 B
Go
14 lines
286 B
Go
|
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
|
||
|
}
|