incus-agent: Switch to go-yaml/v4

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This commit is contained in:
Stéphane Graber 2026-03-31 02:36:31 +00:00
parent fa3a8d4ddc
commit 39a18a73b3
No known key found for this signature in database
GPG Key ID: C638974D64792D67
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ import (
"io/fs"
"os"
"gopkg.in/yaml.v2"
"go.yaml.in/yaml/v4"
)
type agentConfig struct {
@ -23,7 +23,7 @@ func loadAgentConfig(d *Daemon) error {
}
cfg := agentConfig{}
err = yaml.Unmarshal(data, &cfg)
err = yaml.Load(data, &cfg)
if err != nil {
return err
}

View File

@ -8,7 +8,7 @@ import (
"path/filepath"
"strconv"
"gopkg.in/yaml.v2"
"go.yaml.in/yaml/v4"
"github.com/lxc/incus/v6/shared/api"
"github.com/lxc/incus/v6/shared/util"
@ -27,7 +27,7 @@ func templatesApply(path string) ([]string, error) {
}
metadata := &api.ImageMetadata{}
err = yaml.Unmarshal(content, metadata)
err = yaml.Load(content, metadata)
if err != nil {
return nil, fmt.Errorf("Could not parse metadata.yaml: %w", err)
}