Fix goreport warnings of ineffassign and misspell

Signed-off-by: Ashok Pon Kumar <ashokponkumar@gmail.com>
This commit is contained in:
Ashok Pon Kumar
2020-10-02 00:36:58 +05:30
parent c82737665a
commit fcf210d631
3 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -235,7 +235,6 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
RootlessCgroups: opts.RootlessCgroups,
}
exists := false
for _, m := range spec.Mounts {
config.Mounts = append(config.Mounts, createLibcontainerMount(cwd, m))
}
@@ -253,6 +252,7 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
config.Cgroups = c
// set linux-specific config
if spec.Linux != nil {
var exists bool
if config.RootPropagation, exists = mountPropagationMapping[spec.Linux.RootfsPropagation]; !exists {
return nil, fmt.Errorf("rootfsPropagation=%v is not supported", spec.Linux.RootfsPropagation)
}