fix(config): command line flags are parsed twice, drop automatic parsing

This commit is contained in:
Łukasz Mierzwa
2018-09-12 21:50:21 +01:00
parent 3fb4460e6c
commit 84cda643f3

View File

@@ -3,7 +3,6 @@ package config
import (
"bufio"
"bytes"
"flag"
"path"
"strings"
"time"
@@ -80,9 +79,6 @@ func init() {
func (config *configSchema) Read() {
v := viper.New()
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.Parse()
err := v.BindPFlags(pflag.CommandLine)
if err != nil {
log.Errorf("Failed to bind flag set to the configuration: %s", err)