repository cleanup

This commit is contained in:
wish
2022-07-29 03:25:23 +10:00
parent a0be6c627c
commit 2c0e7a5267
645 changed files with 996 additions and 903 deletions

8
common/bfutil/bfutil.go Normal file
View File

@@ -0,0 +1,8 @@
package bfutil
import "bytes"
// UpToNull returns the given byte slice's data, up to (not including) the first null byte.
func UpToNull(data []byte) []byte {
return bytes.SplitN(data, []byte{0x00}, 2)[0]
}