grrrr
This commit is contained in:
parent
aff3757618
commit
cc8322f221
9 changed files with 136 additions and 38 deletions
|
|
@ -19,3 +19,11 @@ func ReadUntilNull(reader *bufio.Reader) ([]byte, error) {
|
|||
}
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
func ReadUntilNullString(reader *bufio.Reader) (string, error) {
|
||||
buf, err := ReadUntilNull(reader)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(buf), nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue