Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update module github.com/pelletier/go-toml to v2 #1159

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/rthooks/patch-containerd-conf.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: Apache-2.0

Check failure on line 1 in contrib/rthooks/patch-containerd-conf.go

View workflow job for this annotation

GitHub Actions / golangci-lint

: # github.com/cilium/tetragon/contrib/rthooks
// Copyright Authors of Tetragon

package main
Expand All @@ -10,7 +10,7 @@
"strings"

srvconf "github.com/containerd/containerd/services/server/config"
"github.com/pelletier/go-toml"
"github.com/pelletier/go-toml/v2"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
Expand Down Expand Up @@ -56,7 +56,7 @@
}

type addLine struct {
pos toml.Position

Check failure on line 59 in contrib/rthooks/patch-containerd-conf.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: toml.Position
line string
}

Expand All @@ -68,7 +68,7 @@
}

// parseRuntime parses a runtime section
func (st *parseState) parseRuntime(t *toml.Tree) error {

Check failure on line 71 in contrib/rthooks/patch-containerd-conf.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: toml.Tree
ty := t.Get("runtime_type")
if ty != "io.containerd.runc.v2" {
return nil
Expand All @@ -88,7 +88,7 @@
}

// parseCri parses the "io.containerd.grpc.v1.cri" section of containerd config
func (st *parseState) parseCri(t *toml.Tree) error {

Check failure on line 91 in contrib/rthooks/patch-containerd-conf.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: toml.Tree
pos := t.Position()
st.log.WithFields(logrus.Fields{
"line": pos.Line,
Expand Down Expand Up @@ -135,7 +135,7 @@
// parseConfig parses a containerd configuration file and returns a set of lines to add
func parseConfig(log *logrus.Logger, cnf *cmdConf) ([]addLine, error) {
srvConfig := srvconf.Config{}
file, err := toml.LoadFile(cnf.containerdConf)

Check failure on line 138 in contrib/rthooks/patch-containerd-conf.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: toml.LoadFile (typecheck)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ require (
github.com/mennanov/fmutils v0.2.0
github.com/opencontainers/runc v1.1.9
github.com/opencontainers/runtime-spec v1.1.0
github.com/pelletier/go-toml v1.9.5
github.com/pelletier/go-toml/v2 v2.1.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.16.0
github.com/prometheus/client_model v0.4.0
Expand Down Expand Up @@ -137,7 +137,7 @@ require (
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
Expand Down
Loading