Skip to content

Commit

Permalink
Use interface{} for static provider instead of a map[string]interface…
Browse files Browse the repository at this point in the history
…{} (#416)
  • Loading branch information
Alex committed Mar 16, 2017
1 parent 68c6f9d commit f26c0de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/static_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type staticProvider struct {

// NewStaticProvider should only be used in tests to isolate config from your environment
// It is not race free, because underlying objects can be accessed with Value().
func NewStaticProvider(data map[string]interface{}) Provider {
func NewStaticProvider(data interface{}) Provider {
b, err := yaml.Marshal(data)
if err != nil {
panic(err)
Expand All @@ -38,7 +38,7 @@ func NewStaticProvider(data map[string]interface{}) Provider {
}

// StaticProvider returns function to create StaticProvider during configuration initialization
func StaticProvider(data map[string]interface{}) ProviderFunc {
func StaticProvider(data interface{}) ProviderFunc {
return func() (Provider, error) {
return NewStaticProvider(data), nil
}
Expand Down

0 comments on commit f26c0de

Please sign in to comment.