Skip to content

Commit 509de01

Browse files
committed
feat: Add spooky hidden flag
1 parent c8246e3 commit 509de01

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

cli/start.go

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ func start() *cobra.Command {
6363
traceDatadog bool
6464
secureAuthCookie bool
6565
sshKeygenAlgorithmRaw string
66+
spooky bool
6667
)
6768

6869
root := &cobra.Command{
@@ -76,7 +77,7 @@ func start() *cobra.Command {
7677
defer tracer.Stop()
7778
}
7879

79-
printLogo(cmd)
80+
printLogo(cmd, spooky)
8081
listener, err := net.Listen("tcp", address)
8182
if err != nil {
8283
return xerrors.Errorf("listen %q: %w", address, err)
@@ -394,6 +395,8 @@ func start() *cobra.Command {
394395
cliflag.BoolVarP(root.Flags(), &secureAuthCookie, "secure-auth-cookie", "", "CODER_SECURE_AUTH_COOKIE", false, "Specifies if the 'Secure' property is set on browser session cookies")
395396
cliflag.StringVarP(root.Flags(), &sshKeygenAlgorithmRaw, "ssh-keygen-algorithm", "", "CODER_SSH_KEYGEN_ALGORITHM", "ed25519", "Specifies the algorithm to use for generating ssh keys. "+
396397
`Accepted values are "ed25519", "ecdsa", or "rsa4096"`)
398+
cliflag.BoolVarP(root.Flags(), &spooky, "spooky", "", "", false, "Specifies spookiness level")
399+
_ = root.Flags().MarkHidden("spooky")
397400

398401
return root
399402
}
@@ -464,13 +467,27 @@ func newProvisionerDaemon(ctx context.Context, client *codersdk.Client, logger s
464467
}), nil
465468
}
466469

467-
func printLogo(cmd *cobra.Command) {
470+
func printLogo(cmd *cobra.Command, spooky bool) {
471+
if spooky {
472+
_, _ = fmt.Fprintf(cmd.OutOrStdout(), `
473+
▄████▄ ▒█████ ▓█████▄ ▓█████ ██▀███
474+
▒██▀ ▀█ ▒██▒ ██▒▒██▀ ██▌▓█ ▀ ▓██ ▒ ██▒
475+
▒▓█ ▄ ▒██░ ██▒░██ █▌▒███ ▓██ ░▄█ ▒
476+
▒▓▓▄ ▄██▒▒██ ██░░▓█▄ ▌▒▓█ ▄ ▒██▀▀█▄
477+
▒ ▓███▀ ░░ ████▓▒░░▒████▓ ░▒████▒░██▓ ▒██▒
478+
░ ░▒ ▒ ░░ ▒░▒░▒░ ▒▒▓ ▒ ░░ ▒░ ░░ ▒▓ ░▒▓░
479+
░ ▒ ░ ▒ ▒░ ░ ▒ ▒ ░ ░ ░ ░▒ ░ ▒░
480+
░ ░ ░ ░ ▒ ░ ░ ░ ░ ░░ ░
481+
░ ░ ░ ░ ░ ░ ░ ░
482+
░ ░
483+
`)
484+
return
485+
}
468486
_, _ = fmt.Fprintf(cmd.OutOrStdout(), ` ▄█▀ ▀█▄
469487
▄▄ ▀▀▀ █▌ ██▀▀█▄ ▐█
470488
▄▄██▀▀█▄▄▄ ██ ██ █▀▀█ ▐█▀▀██ ▄█▀▀█ █▀▀
471489
█▌ ▄▌ ▐█ █▌ ▀█▄▄▄█▌ █ █ ▐█ ██ ██▀▀ █
472490
██████▀▄█ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀▀ ▀▀▀▀ ▀
473-
474491
`)
475492
}
476493

0 commit comments

Comments
 (0)