mirror of
https://github.com/lxc/incus
synced 2026-08-02 05:26:46 +00:00
incus-agent: Switch to go-yaml/v4
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This commit is contained in:
parent
fa3a8d4ddc
commit
39a18a73b3
@ -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
|
||||
}
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user