Fix go-flags dep + formatting

This commit is contained in:
Thom Seddon
2019-05-13 11:56:43 +01:00
parent e7b567bc92
commit 5a17187855
4 changed files with 6 additions and 4 deletions

View File

@ -41,7 +41,7 @@ type Config struct {
Rules map[string]*Rule `long:"rules.<name>.<param>" description:"Rule definitions, param can be: \"action\" or \"rule\""`
// Filled during transformations
Secret []byte `json:"-"`
Secret []byte `json:"-"`
Lifetime time.Duration
// Legacy
@ -141,7 +141,7 @@ func NewConfig(args []string) (Config, error) {
}
func (c *Config) parseFlags(args []string) error {
p := flags.NewParser(c, flags.Default | flags.IniUnknownOptionHandler)
p := flags.NewParser(c, flags.Default|flags.IniUnknownOptionHandler)
p.UnknownOptionHandler = c.parseUnknownFlag
i := flags.NewIniParser(p)

View File

@ -175,7 +175,7 @@ func (s *Server) logger(r *http.Request, rule, msg string) *logrus.Entry {
// Log request
logger.WithFields(logrus.Fields{
"rule": rule,
"rule": rule,
"headers": r.Header,
}).Debug(msg)