File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
plugin/sampling/strategystore/static Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ var _ plugin.Configurable = new(Factory)
32
32
func TestFactory (t * testing.T ) {
33
33
f := NewFactory ()
34
34
v , command := config .Viperize (f .AddFlags )
35
- command .ParseFlags ([]string {"--sampling.strategies=fixtures/strategies.json" })
35
+ command .ParseFlags ([]string {"--sampling.strategies-file =fixtures/strategies.json" })
36
36
f .InitFromViper (v )
37
37
38
38
assert .NoError (t , f .Initialize (metrics .NullFactory , zap .NewNop ()))
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import (
21
21
)
22
22
23
23
const (
24
- samplingStrategies = "sampling.strategies"
24
+ samplingStrategiesFile = "sampling.strategies-file "
25
25
)
26
26
27
27
// Options holds configuration for the static sampling strategy store.
@@ -32,11 +32,11 @@ type Options struct {
32
32
33
33
// AddFlags adds flags for Options
34
34
func AddFlags (flagSet * flag.FlagSet ) {
35
- flagSet .String (samplingStrategies , "" , "The path for the sampling strategies file in JSON format" )
35
+ flagSet .String (samplingStrategiesFile , "" , "The path for the sampling strategies file in JSON format" )
36
36
}
37
37
38
38
// InitFromViper initializes Options with properties from viper
39
39
func (opts * Options ) InitFromViper (v * viper.Viper ) * Options {
40
- opts .StrategiesFile = v .GetString (samplingStrategies )
40
+ opts .StrategiesFile = v .GetString (samplingStrategiesFile )
41
41
return opts
42
42
}
You can’t perform that action at this time.
0 commit comments