Skip to content

Commit da6dc11

Browse files
committed
Allow -w as an alias for --no-password.
1 parent 570b0fd commit da6dc11

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmd/pgmetrics/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Connection options:
7373
(default: "%s")
7474
-p, --port=PORT database server port (default: %d)
7575
-U, --username=USERNAME database user name (default: "%s")
76-
--no-password never prompt for password
76+
-w, --no-password never prompt for password
7777
7878
For more information, visit <https://pgmetrics.io>.
7979
`
@@ -198,7 +198,7 @@ func (o *options) parse() (args []string) {
198198
s.StringVarLong(&o.CollectConfig.Host, "host", 'h', "")
199199
s.Uint16VarLong(&o.CollectConfig.Port, "port", 'p', "")
200200
s.StringVarLong(&o.CollectConfig.User, "username", 'U', "")
201-
s.BoolVarLong(&o.passNone, "no-password", 0, "")
201+
s.BoolVarLong(&o.passNone, "no-password", 'w', "")
202202

203203
// parse
204204
s.Parse(os.Args)

0 commit comments

Comments
 (0)