Skip to content

Commit

Permalink
lxd/apparmor: fix linter errors
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Mikhalitsyn <[email protected]>
  • Loading branch information
mihalicyn committed Jul 11, 2024
1 parent c15c095 commit b9df06a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lxd/apparmor/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func archiveProfile(outputPath string, allowedCommandPaths []string) (string, er
}

// Render the profile.
var sb *strings.Builder = &strings.Builder{}
sb := &strings.Builder{}
err = archiveProfileTpl.Execute(sb, map[string]any{
"name": ArchiveProfileName(outputPath), // Use non-deferenced outputPath for name.
"outputPath": outputPathFull, // Use deferenced path in AppArmor profile.
Expand Down
2 changes: 1 addition & 1 deletion lxd/apparmor/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func instanceProfile(sysOS *sys.OS, inst instance) (string, error) {
}

// Render the profile.
var sb *strings.Builder = &strings.Builder{}
sb := &strings.Builder{}
if inst.Type() == instancetype.Container {
err = lxcProfileTpl.Execute(sb, map[string]any{
"feature_cgns": sysOS.CGInfo.Namespacing,
Expand Down
2 changes: 1 addition & 1 deletion lxd/apparmor/rsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func rsyncProfile(sysOS *sys.OS, name string, sourcePath string, dstPath string)
execPath = fullPath
}

var sb *strings.Builder = &strings.Builder{}
sb := &strings.Builder{}
err = rsyncProfileTpl.Execute(sb, map[string]any{
"name": name,
"execPath": execPath,
Expand Down

0 comments on commit b9df06a

Please sign in to comment.