Skip to content

Commit

Permalink
cli/flags: hide --advrertise-sql-addr from the output of --help
Browse files Browse the repository at this point in the history
See discussion in cockroachdb#52266.

Release note: None
  • Loading branch information
knz committed Aug 3, 2020
1 parent b0ec3c9 commit cbbc301
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pkg/cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,18 @@ func init() {
varFlag(f, addrSetter{&serverAdvertiseAddr, &serverAdvertisePort}, cliflags.AdvertiseAddr)
varFlag(f, addrSetter{&serverSQLAddr, &serverSQLPort}, cliflags.ListenSQLAddr)
varFlag(f, addrSetter{&serverSQLAdvertiseAddr, &serverSQLAdvertisePort}, cliflags.SQLAdvertiseAddr)
// --sql-advertise-addr is misdesigned and not yet completely
// useful in practice. Avoid confusing the user by having it
// called out in --help.
// See: https://github.com/cockroachdb/cockroach/issues/52266
_ = f.MarkHidden(cliflags.SQLAdvertiseAddr.Name)

varFlag(f, addrSetter{&serverTenantAddr, &serverTenantPort}, cliflags.ListenTenantAddr)
varFlag(f, addrSetter{&serverTenantAdvertiseAddr, &serverTenantAdvertisePort}, cliflags.TenantAdvertiseAddr)
// Hide tenant-related flags.
_ = f.MarkHidden(cliflags.ListenTenantAddr.Name)
_ = f.MarkHidden(cliflags.TenantAdvertiseAddr.Name)

varFlag(f, addrSetter{&serverHTTPAddr, &serverHTTPPort}, cliflags.ListenHTTPAddr)
stringFlag(f, &serverSocketDir, cliflags.SocketDir)
// --socket is deprecated as of 20.1.
Expand All @@ -360,10 +370,6 @@ func init() {
_ = f.MarkDeprecated(cliflags.Socket.Name, "use the --socket-dir and --listen-addr flags instead")
boolFlag(f, &startCtx.unencryptedLocalhostHTTP, cliflags.UnencryptedLocalhostHTTP)

// Hide tenant-related flags.
_ = f.MarkHidden(cliflags.ListenTenantAddr.Name)
_ = f.MarkHidden(cliflags.TenantAdvertiseAddr.Name)

// Backward-compatibility flags.

// These are deprecated but until we have qualitatively new
Expand Down

0 comments on commit cbbc301

Please sign in to comment.