Vendor github.com/mdlayher/wifi and dependencies

This commit is contained in:
Matt Layher 2017-01-09 14:33:55 -05:00
commit 82a2b8fc02
No known key found for this signature in database
GPG key ID: 77BFE531397EDE94
34 changed files with 8970 additions and 0 deletions

14
vendor/github.com/mdlayher/netlink/nlenc/string.go generated vendored Normal file
View 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}))
}