fix: go linter issue & not defined variables.
This commit is contained in:
parent
0f382a4d5d
commit
bc216176a3
7 changed files with 14 additions and 19 deletions
|
|
@ -42,7 +42,10 @@ func (d Exec) Apply(opt *Option, profileRaw string) (string, error) {
|
|||
for name := range opt.ArgMap {
|
||||
profiletoTransition := util.MustReadFile(cfg.RootApparmord.Join(name))
|
||||
dstProfile := aa.DefaultTunables()
|
||||
dstProfile.Parse(profiletoTransition)
|
||||
err := dstProfile.Parse(profiletoTransition)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
for _, variable := range dstProfile.Preamble.GetVariables() {
|
||||
if variable.Name == "exec_path" {
|
||||
for _, v := range variable.Values {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue