1
1
mirror of https://github.com/wader/fq.git synced 2024-11-26 21:55:57 +03:00

postgres: refactoring

This commit is contained in:
Pavel Safonov 2023-05-03 15:40:32 +03:00
parent 9508a209ea
commit f6f8d5c037
3 changed files with 5 additions and 5 deletions

View File

@ -343,7 +343,7 @@ type TLS_In struct {
Keylog string `doc:"NSS Key Log content"`
}
type PostgresIn struct {
type PgControlIn struct {
Flavour string `doc:"PostgreSQL flavour: postgres14, pgproee14.., postgres10"`
}

View File

@ -32,7 +32,7 @@ func init() {
interp.RegisterFormat(format.PG_CONTROL, &decode.Format{
Description: "PostgreSQL control file",
DecodeFn: decodePgControl,
DefaultInArg: format.PostgresIn{
DefaultInArg: format.PgControlIn{
Flavour: "",
},
})
@ -72,9 +72,9 @@ const (
func decodePgControl(d *decode.D) any {
d.Endian = decode.LittleEndian
var pgIn format.PostgresIn
var pgIn format.PgControlIn
if !d.ArgAs(&pgIn) {
d.Fatalf("DecodeInArg must be PostgresIn!\n")
d.Fatalf("DecodeInArg must be PgControlIn!\n")
}
switch pgIn.Flavour {

View File

@ -37,7 +37,7 @@ func decodePgheap(d *decode.D) any {
var pgIn format.PostgresHeapIn
if !d.ArgAs(&pgIn) {
d.Fatalf("DecodeInArg must be PostgresIn!\n")
d.Fatalf("DecodeInArg must be PostgresHeapIn!\n")
}
switch pgIn.Flavour {