Melora Hugues
576c78e6dd
All checks were successful
continuous-integration/drone/push Build is passing
13 lines
286 B
Go
13 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
|
|
}
|