update golangci
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
2023-06-04 18:51:00 +03:00
parent e1dfdc28ff
commit d839e1ac90
21 changed files with 145 additions and 106 deletions

View File

@@ -15,7 +15,7 @@ var (
)
func New(duration time.Duration, provider config.Provider, opts ...Option) *Provider {
p := &Provider{
prov := &Provider{
Provider: provider,
ticker: time.NewTicker(duration),
logger: func(_ context.Context, msg string) {
@@ -24,10 +24,10 @@ func New(duration time.Duration, provider config.Provider, opts ...Option) *Prov
}
for _, opt := range opts {
opt(p)
opt(prov)
}
return p
return prov
}
func WithLogger(l func(context.Context, string)) Option {

View File

@@ -22,12 +22,13 @@ func (p *provider) Name() string {
return "test"
}
func (p *provider) Read(ctx context.Context, k config.Key) (config.Variable, error) {
func (p *provider) Read(context.Context, config.Key) (config.Variable, error) {
p.cnt++
return config.Variable{
Name: "tmpname",
Value: value.JString(fmt.Sprint(p.cnt)),
Name: "tmpname",
Provider: p.Name(),
Value: value.JString(fmt.Sprint(p.cnt)),
}, nil
}