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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user