Vendor github.com/mdlayher/wifi and dependencies
This commit is contained in:
parent
e9cea11553
commit
82a2b8fc02
34 changed files with 8970 additions and 0 deletions
14
vendor/github.com/mdlayher/netlink/nlenc/string.go
generated
vendored
Normal file
14
vendor/github.com/mdlayher/netlink/nlenc/string.go
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
package nlenc
|
||||
|
||||
import "bytes"
|
||||
|
||||
// Bytes returns a null-terminated byte slice with the contents of s.
|
||||
func Bytes(s string) []byte {
|
||||
return append([]byte(s), 0x00)
|
||||
}
|
||||
|
||||
// String returns a string with the contents of b from a null-terminated
|
||||
// byte slice.
|
||||
func String(b []byte) string {
|
||||
return string(bytes.TrimSuffix(b, []byte{0x00}))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue