mirror of
https://github.com/wader/fq.git
synced 2024-12-25 06:12:30 +03:00
allow to change FillGaps in decoder
This commit is contained in:
parent
b4c4de26ca
commit
2ee01f79c2
@ -56,6 +56,7 @@ const (
|
|||||||
|
|
||||||
func decodePgControl(d *decode.D, in any) any {
|
func decodePgControl(d *decode.D, in any) any {
|
||||||
d.Endian = decode.LittleEndian
|
d.Endian = decode.LittleEndian
|
||||||
|
d.Options.FillGaps = false
|
||||||
|
|
||||||
flavour := in.(format.PostgresIn).Flavour
|
flavour := in.(format.PostgresIn).Flavour
|
||||||
switch flavour {
|
switch flavour {
|
||||||
|
@ -32,6 +32,7 @@ func init() {
|
|||||||
|
|
||||||
func decodePgheap(d *decode.D, in any) any {
|
func decodePgheap(d *decode.D, in any) any {
|
||||||
d.Endian = decode.LittleEndian
|
d.Endian = decode.LittleEndian
|
||||||
|
d.Options.FillGaps = false
|
||||||
|
|
||||||
flavour := in.(format.PostgresIn).Flavour
|
flavour := in.(format.PostgresIn).Flavour
|
||||||
switch flavour {
|
switch flavour {
|
||||||
|
@ -118,7 +118,7 @@ func decode(ctx context.Context, br bitio.ReaderAtSeeker, group Group, opts Opti
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: maybe move to Format* funcs?
|
// TODO: maybe move to Format* funcs?
|
||||||
if opts.FillGaps {
|
if d.Options.FillGaps {
|
||||||
d.FillGaps(ranges.Range{Start: 0, Len: decodeRange.Len}, "unknown")
|
d.FillGaps(ranges.Range{Start: 0, Len: decodeRange.Len}, "unknown")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user