update deps
Some checks failed
build / test (push) Failing after 1m8s
codeql / analyze (go) (push) Failing after 1m53s
build / lint (push) Successful in 9m37s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2024-03-06 17:34:29 +03:00
parent d77095fb4c
commit 2fa6be8f5a
3 changed files with 11 additions and 23 deletions

View File

@ -1,4 +1,4 @@
package file // import "go.unistack.org/micro-config-file/v4" package file
import ( import (
"context" "context"
@ -6,7 +6,7 @@ import (
"io" "io"
"os" "os"
"github.com/imdario/mergo" "dario.cat/mergo"
"go.unistack.org/micro/v4/codec" "go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/config" "go.unistack.org/micro/v4/config"
"go.unistack.org/micro/v4/options" "go.unistack.org/micro/v4/options"
@ -70,7 +70,7 @@ func (c *fileConfig) Load(ctx context.Context, opts ...options.Option) error {
} }
} }
fp, err := os.OpenFile(path, os.O_RDONLY, os.FileMode(0400)) fp, err := os.OpenFile(path, os.O_RDONLY, os.FileMode(0o400))
if err != nil { if err != nil {
if !c.opts.AllowFail { if !c.opts.AllowFail {
return fmt.Errorf("file load path %s error: %w", path, err) return fmt.Errorf("file load path %s error: %w", path, err)
@ -162,7 +162,7 @@ func (c *fileConfig) Save(ctx context.Context, opts ...options.Option) error {
return nil return nil
} }
fp, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE, os.FileMode(0600)) fp, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE, os.FileMode(0o600))
if err != nil { if err != nil {
if !c.opts.AllowFail { if !c.opts.AllowFail {
return err return err

9
go.mod
View File

@ -3,11 +3,8 @@ module go.unistack.org/micro-config-file/v4
go 1.20 go 1.20
require ( require (
github.com/imdario/mergo v0.3.16 dario.cat/mergo v1.0.0
go.unistack.org/micro/v4 v4.0.15 go.unistack.org/micro/v4 v4.0.17
) )
require ( require github.com/google/uuid v1.6.0 // indirect
dario.cat/mergo v1.0.0 // indirect
github.com/google/uuid v1.5.0 // indirect
)

17
go.sum
View File

@ -1,18 +1,9 @@
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= go.unistack.org/micro/v4 v4.0.17 h1:mF7uM+J4ILdG+1fcwzKYCwDlxhdbF/e1WnGzKKLnIXc=
github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= go.unistack.org/micro/v4 v4.0.17/go.mod h1:ZDgU9931vm2l7X6RN/6UuwRIVp24GRdmQ7dKmegArk4=
github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM=
github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
go.unistack.org/micro/v4 v4.0.1 h1:xo1IxbVfgh8i0eY0VeYa3cbb13u5n/Mxnp3FOgWD4Jo=
go.unistack.org/micro/v4 v4.0.1/go.mod h1:p/J5UcSJjfHsWGT31uKoghQ5rUQZzQJBAFy+Z4+ZVMs=
go.unistack.org/micro/v4 v4.0.6 h1:YFWvTh3VwyOd6NHYTQcf47n2TF5+p/EhpnbuBQX3qhk=
go.unistack.org/micro/v4 v4.0.6/go.mod h1:bVEYTlPi0EsdgZZt311bIroDg9ict7ky3C87dSCCAGk=
go.unistack.org/micro/v4 v4.0.15 h1:o4++RYX5guVPxfcJpP7VCj2Xr9BPFo6fj4+b5FStdEI=
go.unistack.org/micro/v4 v4.0.15/go.mod h1:ZDgU9931vm2l7X6RN/6UuwRIVp24GRdmQ7dKmegArk4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=