1
1
mirror of https://github.com/wader/fq.git synced 2024-12-25 14:23:18 +03:00
fq/doc/presentations/bts2022/mp3.go
Mattias Wadman e9d9f8aef9 fq: Use go 1.18
Rename s/interface{}/any/g
Preparation for using generics in decode API and native jq funcations etc
Remove some unused linter ignores as linter has been fixed
2022-05-20 15:23:16 +02:00

22 lines
390 B
Go

func decode(d *decode.D, in any) any {
d.FieldArray("headers", func(d *decode.D) {
for !d.End() {
d.TryFieldFormat("header", headerGroup)
}
})
d.FieldArray("frames", func(d *decode.D) {
for !d.End() {
d.TryFieldFormat("frame", mp3Group)
}
})
d.FieldArray("footers", func(d *decode.D) {
for !d.End() {
d.TryFieldFormat("footer", footerGroup)
}
})
return nil
}