Minor formatting changes

This commit is contained in:
raul 2024-05-14 09:27:23 +02:00
parent 7493af68fc
commit 872523700b
2 changed files with 4 additions and 1 deletions

View File

@ -43,6 +43,7 @@ func setServerParameters(cmd *cobra.Command) error {
if parameterPort != "" { if parameterPort != "" {
listenPort = parameterPort listenPort = parameterPort
} }
parameterHistory, err := cmd.Flags().GetString("history") parameterHistory, err := cmd.Flags().GetString("history")
if err != nil { if err != nil {
return err return err
@ -51,6 +52,7 @@ func setServerParameters(cmd *cobra.Command) error {
logLocation = parameterHistory logLocation = parameterHistory
isLogging = true isLogging = true
} }
parPassword, err := cmd.Flags().GetString("password") parPassword, err := cmd.Flags().GetString("password")
if err != nil { if err != nil {
return err return err
@ -58,6 +60,7 @@ func setServerParameters(cmd *cobra.Command) error {
if parPassword != "" { if parPassword != "" {
password = parPassword password = parPassword
} }
insecure, err := cmd.Flags().GetBool("insecure") insecure, err := cmd.Flags().GetBool("insecure")
if insecure == true { if insecure == true {
servInsecure = true servInsecure = true

View File

@ -73,7 +73,7 @@ func Server() {
var ln net.Listener var ln net.Listener
var err error var err error
if servInsecure == true { if servInsecure == true {
fmt.Println("[WARNING] Starting unencrypted server!") fmt.Println("WARNING: Starting unencrypted server!")
ln, err = startInsecureServer() ln, err = startInsecureServer()
} else { } else {
ln, err = startSecureServer() ln, err = startSecureServer()