MCPcopy Index your code
hub / github.com/tinylib/msgp / astuple

Function astuple

parse/directives.go:200–216  ·  view source on GitHub ↗

msgp:tuple {TypeA} {TypeB}...

(text []string, f *FileSet)

Source from the content-addressed store, hash-verified

198
199//msgp:tuple {TypeA} {TypeB}...
200func astuple(text []string, f *FileSet) error {
201 if len(text) < 2 {
202 return nil
203 }
204 for _, item := range text[1:] {
205 name := strings.TrimSpace(item)
206 if el, ok := f.Identities[name]; ok {
207 if st, ok := el.(*gen.Struct); ok {
208 st.AsTuple = true
209 infof(name)
210 } else {
211 warnf("%s: only structs can be tuples\n", name)
212 }
213 }
214 }
215 return nil
216}
217
218//msgp:vartuple {TypeA} {TypeB}...
219func asvartuple(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…