Skip to content

Commit

Permalink
Updated usage function
Browse files Browse the repository at this point in the history
  • Loading branch information
evg4b committed Feb 27, 2023
1 parent ffa7481 commit ac1d4ac
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/configuration/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ package configuration

import (
"fmt"
"os"

"github.com/evg4b/uncors/internal/log"

"github.com/evg4b/uncors/internal/middlewares/mock"
"github.com/spf13/pflag"
Expand Down Expand Up @@ -70,9 +67,7 @@ func LoadConfiguration(viperInstance *viper.Viper, args []string) (*UncorsConfig

func defineFlags() *pflag.FlagSet {
flags := pflag.NewFlagSet("uncors", pflag.ContinueOnError)
flags.Usage = func() {
log.Errorf("Usage of %s:\n%s\n", os.Args[0], flags.FlagUsages())
}
flags.Usage = pflag.Usage
flags.StringSlice("to", []string{}, "Target host with protocol for to the resource to be proxy")
flags.StringSlice("from", []string{}, "Local host with protocol for to the resource from which proxying will take place") //nolint: lll
flags.Uint("http-port", defaultHTTPPort, "Local HTTP listening port")
Expand Down

0 comments on commit ac1d4ac

Please sign in to comment.