Merge pull request #10182 from containerd/dependabot/go_modules/github.com/pelletier/go-toml/v2-2.2.2

build(deps): bump github.com/pelletier/go-toml/v2 from 2.2.1 to 2.2.2
This commit is contained in:
Akihiro Suda
2024-05-07 03:17:41 +00:00
committed by GitHub
4 changed files with 9 additions and 11 deletions

View File

@@ -57,7 +57,11 @@ type SeenTracker struct {
currentIdx int
}
var pool sync.Pool
var pool = sync.Pool{
New: func() interface{} {
return &SeenTracker{}
},
}
func (s *SeenTracker) reset() {
// Always contains a root element at index 0.
@@ -331,12 +335,6 @@ func (s *SeenTracker) checkArray(node *unstable.Node) (first bool, err error) {
}
func (s *SeenTracker) checkInlineTable(node *unstable.Node) (first bool, err error) {
if pool.New == nil {
pool.New = func() interface{} {
return &SeenTracker{}
}
}
s = pool.Get().(*SeenTracker)
s.reset()

2
vendor/modules.txt vendored
View File

@@ -374,7 +374,7 @@ github.com/opencontainers/runtime-tools/validate/capabilities
github.com/opencontainers/selinux/go-selinux
github.com/opencontainers/selinux/go-selinux/label
github.com/opencontainers/selinux/pkg/pwalkdir
# github.com/pelletier/go-toml/v2 v2.2.1
# github.com/pelletier/go-toml/v2 v2.2.2
## explicit; go 1.16
github.com/pelletier/go-toml/v2
github.com/pelletier/go-toml/v2/internal/characters