lint: fix shadowing
Signed-off-by: Jacek J. Łakis <jacek.lakis@intel.com>
This commit is contained in:
parent
b4e9023102
commit
0ba2be0dc8
1 changed files with 7 additions and 7 deletions
|
@ -526,20 +526,20 @@ func New(config *Config) (*Server, error) {
|
||||||
appArmorProfile: config.ApparmorProfile,
|
appArmorProfile: config.ApparmorProfile,
|
||||||
}
|
}
|
||||||
if s.seccompEnabled {
|
if s.seccompEnabled {
|
||||||
seccompProfile, err := ioutil.ReadFile(config.SeccompProfile)
|
seccompProfile, fileErr := ioutil.ReadFile(config.SeccompProfile)
|
||||||
if err != nil {
|
if fileErr != nil {
|
||||||
return nil, fmt.Errorf("opening seccomp profile (%s) failed: %v", config.SeccompProfile, err)
|
return nil, fmt.Errorf("opening seccomp profile (%s) failed: %v", config.SeccompProfile, fileErr)
|
||||||
}
|
}
|
||||||
var seccompConfig seccomp.Seccomp
|
var seccompConfig seccomp.Seccomp
|
||||||
if err := json.Unmarshal(seccompProfile, &seccompConfig); err != nil {
|
if jsonErr := json.Unmarshal(seccompProfile, &seccompConfig); jsonErr != nil {
|
||||||
return nil, fmt.Errorf("decoding seccomp profile failed: %v", err)
|
return nil, fmt.Errorf("decoding seccomp profile failed: %v", jsonErr)
|
||||||
}
|
}
|
||||||
s.seccompProfile = seccompConfig
|
s.seccompProfile = seccompConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.appArmorEnabled && s.appArmorProfile == apparmor.DefaultApparmorProfile {
|
if s.appArmorEnabled && s.appArmorProfile == apparmor.DefaultApparmorProfile {
|
||||||
if err := apparmor.EnsureDefaultApparmorProfile(); err != nil {
|
if apparmorErr := apparmor.EnsureDefaultApparmorProfile(); apparmorErr != nil {
|
||||||
return nil, fmt.Errorf("ensuring the default apparmor profile is installed failed: %v", err)
|
return nil, fmt.Errorf("ensuring the default apparmor profile is installed failed: %v", apparmorErr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue