MCPcopy
hub / github.com/tinylib/msgp / asvartuple

Function asvartuple

parse/directives.go:219–236  ·  view source on GitHub ↗

msgp:vartuple {TypeA} {TypeB}...

(text []string, f *FileSet)

Source from the content-addressed store, hash-verified

217
218//msgp:vartuple {TypeA} {TypeB}...
219func asvartuple(text []string, f *FileSet) error {
220 if len(text) < 2 {
221 return nil
222 }
223 for _, item := range text[1:] {
224 name := strings.TrimSpace(item)
225 if el, ok := f.Identities[name]; ok {
226 if st, ok := el.(*gen.Struct); ok {
227 st.AsTuple = true
228 st.AsVarTuple = true
229 infof(name)
230 } else {
231 warnf("%s: only structs can be tuples\n", name)
232 }
233 }
234 }
235 return nil
236}
237
238//msgp:tag {tagname}
239func tag(text []string, f *FileSet) error {

Callers

nothing calls this directly

Calls 2

infofFunction · 0.85
warnfFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…