msgp:vartuple {TypeA} {TypeB}...
(text []string, f *FileSet)
| 217 | |
| 218 | //msgp:vartuple {TypeA} {TypeB}... |
| 219 | func 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} |
| 239 | func tag(text []string, f *FileSet) error { |