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

@@ -24,16 +24,16 @@ func NewFile(file string, opts ...Option) (*Provider, error) {
type Option func(*Provider)
func configure(tree *toml.Tree, opts ...Option) *Provider {
p := &Provider{
prov := &Provider{
tree: tree,
key: key.Name,
}
for _, opt := range opts {
opt(p)
opt(prov)
}
return p
return prov
}
func New(data []byte, opts ...Option) (*Provider, error) {

View File

@@ -30,11 +30,11 @@ func (s Value) ParseInt() (int, error) {
func (s Value) Unmarshal(target interface{}) error {
b, err := json.Marshal(s.Raw())
if err != nil {
return fmt.Errorf("%w: %s", config.ErrInvalidValue, err)
return fmt.Errorf("%w: %w", config.ErrInvalidValue, err)
}
if err := json.Unmarshal(b, target); err != nil {
return fmt.Errorf("%w: %s", config.ErrInvalidValue, err)
return fmt.Errorf("%w: %w", config.ErrInvalidValue, err)
}
return nil