1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
package decode
type Group struct {
Name string
Formats []*Format
DefaultInArg any
}
type Dependency struct {
Groups []*Group
Out *Group
}
type Format struct {
Name string
ProbeOrder int // probe order is from low to hi value then by name
Description string
Groups []*Group
DecodeFn func(d *D) any
DefaultInArg any
RootArray bool
RootName string
Dependencies []Dependency
Functions []string
SkipDecodeFunction bool
}
func FormatFn(fn func(d *D) any) *Group {
return &Group{
Formats: []*Format{
{DecodeFn: fn},
},
}
}
|