msgp:tuple {TypeA} {TypeB}...
(text []string, f *FileSet)
| 198 | |
| 199 | //msgp:tuple {TypeA} {TypeB}... |
| 200 | func 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}... |
| 219 | func asvartuple(text []string, f *FileSet) error { |