1
0
mirror of https://github.com/lxc/incus.git synced 2026-02-05 09:46:19 +01:00

Limit new() calls

Be more explicit about variable types.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This commit is contained in:
Stéphane Graber
2025-04-24 00:49:56 -04:00
parent 349272181b
commit db29bd7aa8
16 changed files with 26 additions and 25 deletions

View File

@@ -26,7 +26,7 @@ func templatesApply(path string) ([]string, error) {
return nil, fmt.Errorf("Failed to read metadata: %w", err)
}
metadata := new(api.ImageMetadata)
metadata := &api.ImageMetadata{}
err = yaml.Unmarshal(content, metadata)
if err != nil {
return nil, fmt.Errorf("Could not parse metadata.yaml: %w", err)