-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcli.go
48 lines (45 loc) · 1.8 KB
/
cli.go
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package psql
const (
binary = "psql"
)
type Options struct {
Flags *Flags
Command string
SourceFile string
AdditionalArgs []string
}
type Flags struct {
Command string `flag:"--command="`
Dbname string `flag:"--dbname="`
FieldSeparator string `flag:"--field-separator="`
File string `flag:"--file="`
Host string `flag:"--host=" validate:"min=1"`
LogFile string `flag:"--log-file="`
Output string `flag:"--output="`
Password string `flag:"-" env:"PGPASSWORD"`
Pset string `flag:"--pset="`
RecordSeparator string `flag:"--record-separator="`
Set string `flag:"--set="`
TableAttr string `flag:"--table-attr="`
User string `flag:"--username="`
Variable string `flag:"--variable="`
Port int `flag:"--port="`
EchoAll bool `flag:"--echo-all"`
EchoHidden bool `flag:"--echo-hidden"`
EchoQueries bool `flag:"--echo-queries"`
Expanded bool `flag:"--expanded"`
FieldSeparatorZero bool `flag:"--field-separator-zero"`
HTML bool `flag:"--html"`
List bool `flag:"--list"`
NoAllign bool `flag:"--no-align"`
NoPassword bool `flag:"--no-password"`
NoPsqlrc bool `flag:"--no-psqlrc"`
NoReafline bool `flag:"--no-readline"`
Quiet bool `flag:"--quiet"`
RecordSeparatorZero bool `flag:"--record-separator-zero"`
SingleLine bool `flag:"--single-line"`
SingleStep bool `flag:"--single-step"`
SingleTransaction bool `flag:"--single-transaction"`
TuplesOnly bool `flag:"--tuples-only"`
Version bool `flsg:"--version"`
}