MCPcopy Create free account
hub / github.com/google/nftables / GetString

Function GetString

userdata/userdata.go:106–115  ·  view source on GitHub ↗
(udata []byte, typ Type)

Source from the content-addressed store, hash-verified

104}
105
106func GetString(udata []byte, typ Type) (string, bool) {
107 data := Get(udata, typ)
108 if data == nil {
109 return "", false
110 }
111
112 data, _ = bytes.CutSuffix(data, []byte{0})
113
114 return string(data), true
115}

Callers 3

decodeMethod · 0.92
TestUserDataCommentFunction · 0.92
TestCommentInteropCli2GoFunction · 0.92

Calls 1

GetFunction · 0.85

Tested by 2

TestUserDataCommentFunction · 0.74
TestCommentInteropCli2GoFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…