Skip to content

Commit b9aa7a6

Browse files
committed
main: Sort flags, unhide --unsafe-passphrase for now
1 parent adef8d6 commit b9aa7a6

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

cmd/ssh-chat/cmd.go

+10-14
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,16 @@ var Version string = "dev"
3030

3131
// Options contains the flag options
3232
type Options struct {
33-
Verbose []bool `short:"v" long:"verbose" description:"Show verbose logging."`
34-
Version bool `long:"version" description:"Print version and exit."`
35-
Identity string `short:"i" long:"identity" description:"Private key to identify server with." default:"~/.ssh/id_rsa"`
36-
Bind string `long:"bind" description:"Host and port to listen on." default:"0.0.0.0:2022"`
37-
Admin string `long:"admin" description:"File of public keys who are admins."`
38-
Whitelist string `long:"whitelist" description:"Optional file of public keys who are allowed to connect."`
39-
Motd string `long:"motd" description:"Optional Message of the Day file."`
40-
Log string `long:"log" description:"Write chat log to this file."`
41-
Pprof int `long:"pprof" description:"Enable pprof http server for profiling."`
42-
43-
// Hidden flags, because they're discouraged from being used casually.
44-
Passphrase string `long:"unsafe-passphrase" description:"Require an interactive passphrase to connect. Whitelist feature is more secure." hidden:"true"`
33+
Admin string `long:"admin" description:"File of public keys who are admins."`
34+
Bind string `long:"bind" description:"Host and port to listen on." default:"0.0.0.0:2022"`
35+
Identity string `short:"i" long:"identity" description:"Private key to identify server with." default:"~/.ssh/id_rsa"`
36+
Log string `long:"log" description:"Write chat log to this file."`
37+
Motd string `long:"motd" description:"Optional Message of the Day file."`
38+
Pprof int `long:"pprof" description:"Enable pprof http server for profiling."`
39+
Verbose []bool `short:"v" long:"verbose" description:"Show verbose logging."`
40+
Version bool `long:"version" description:"Print version and exit."`
41+
Whitelist string `long:"whitelist" description:"Optional file of public keys who are allowed to connect."`
42+
Passphrase string `long:"unsafe-passphrase" description:"Require an interactive passphrase to connect. Whitelist feature is more secure."`
4543
}
4644

4745
const extraHelp = `There are hidden options and easter eggs in ssh-chat. The source code is a good
@@ -51,8 +49,6 @@ place to start looking. Some useful links:
5149
https://github.com/shazow/ssh-chat
5250
* Project Wiki FAQ:
5351
https://github.com/shazow/ssh-chat/wiki/FAQ
54-
* Command Flags Declaration:
55-
https://github.com/shazow/ssh-chat/blob/master/cmd/ssh-chat/cmd.go#L29
5652
`
5753

5854
var logLevels = []log.Level{

0 commit comments

Comments
 (0)