mirror of
https://github.com/yudai/gotty.git
synced 2025-12-27 04:38:50 +01:00
add conditionals
This commit is contained in:
parent
a080c85cbc
commit
81be6fabc0
1 changed files with 6 additions and 2 deletions
8
main.go
8
main.go
|
|
@ -66,8 +66,12 @@ func main() {
|
|||
|
||||
utils.ApplyFlags(cliFlags, flagMappings, c, appOptions, backendOptions)
|
||||
|
||||
appOptions.EnableBasicAuth = c.IsSet("credential")
|
||||
appOptions.EnableTLSClientAuth = c.IsSet("tls-ca-crt")
|
||||
if c.IsSet("credential") {
|
||||
appOptions.EnableBasicAuth = true
|
||||
}
|
||||
if c.IsSet("tls-ca-crt") {
|
||||
appOptions.EnableTLSClientAuth = true
|
||||
}
|
||||
|
||||
err = appOptions.Validate()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue