mirror of
https://github.com/wader/fq.git
synced 2024-12-24 22:05:31 +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 {
|
||||
d.Endian = decode.LittleEndian
|
||||
d.Options.FillGaps = false
|
||||
|
||||
flavour := in.(format.PostgresIn).Flavour
|
||||
switch flavour {
|
||||
|
@ -32,6 +32,7 @@ func init() {
|
||||
|
||||
func decodePgheap(d *decode.D, in any) any {
|
||||
d.Endian = decode.LittleEndian
|
||||
d.Options.FillGaps = false
|
||||
|
||||
flavour := in.(format.PostgresIn).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?
|
||||
if opts.FillGaps {
|
||||
if d.Options.FillGaps {
|
||||
d.FillGaps(ranges.Range{Start: 0, Len: decodeRange.Len}, "unknown")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user