Skip to content

Commit

Permalink
Simplify configuration loading process (#15)
Browse files Browse the repository at this point in the history
The process of loading configs is very convoluted right now: we have interpolated files, non-interpolated files, dynamic providers, functions to look for environment...

We can greatly simplify this process by having a single function that will load all the requested YAML files.
  • Loading branch information
Alex authored Jun 12, 2017
1 parent 063984c commit f38b63d
Show file tree
Hide file tree
Showing 11 changed files with 214 additions and 665 deletions.
6 changes: 5 additions & 1 deletion command_line_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"fmt"
"strings"

flag "github.com/ogier/pflag"
flag "github.com/spf13/pflag"
)

// StringSlice is an alias to string slice, that is used to read comma separated flag values.
Expand All @@ -43,6 +43,10 @@ func (s *StringSlice) Set(val string) error {
return nil
}

func (s *StringSlice) Type() string {
return "StringSlice"
}

type commandLineProvider struct {
Provider
}
Expand Down
2 changes: 1 addition & 1 deletion command_line_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package config
import (
"testing"

flag "github.com/ogier/pflag"
flag "github.com/spf13/pflag"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
Loading

0 comments on commit f38b63d

Please sign in to comment.