fix ineffectual assignments found by golangci-lint
This commit is contained in:
parent
55d3854033
commit
3ff88c336f
4 changed files with 10 additions and 4 deletions
|
|
@ -549,7 +549,7 @@ func (r *Fedora30) firewallStageOptions(firewall *blueprint.FirewallCustomizatio
|
|||
func (r *Fedora30) systemdStageOptions(enabledServices, disabledServices []string, s *blueprint.ServicesCustomization) *pipeline.SystemdStageOptions {
|
||||
if s != nil {
|
||||
enabledServices = append(enabledServices, s.Enabled...)
|
||||
enabledServices = append(disabledServices, s.Disabled...)
|
||||
disabledServices = append(disabledServices, s.Disabled...)
|
||||
}
|
||||
return &pipeline.SystemdStageOptions{
|
||||
EnabledServices: enabledServices,
|
||||
|
|
|
|||
|
|
@ -441,7 +441,6 @@ func (r *RHEL82) Name() string {
|
|||
return name
|
||||
}
|
||||
|
||||
|
||||
func (r *RHEL82) Distribution() common.Distribution {
|
||||
return Distro
|
||||
}
|
||||
|
|
@ -692,7 +691,7 @@ func (r *RHEL82) firewallStageOptions(firewall *blueprint.FirewallCustomization)
|
|||
func (r *RHEL82) systemdStageOptions(enabledServices, disabledServices []string, s *blueprint.ServicesCustomization, target string) *pipeline.SystemdStageOptions {
|
||||
if s != nil {
|
||||
enabledServices = append(enabledServices, s.Enabled...)
|
||||
enabledServices = append(disabledServices, s.Disabled...)
|
||||
disabledServices = append(disabledServices, s.Disabled...)
|
||||
}
|
||||
return &pipeline.SystemdStageOptions{
|
||||
EnabledServices: enabledServices,
|
||||
|
|
|
|||
|
|
@ -132,6 +132,9 @@ func (a *AWS) Register(name, bucket, key string) (*string, error) {
|
|||
},
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
snapshotId := importOutput.ImportSnapshotTasks[0].SnapshotTaskDetail.SnapshotId
|
||||
|
||||
|
|
|
|||
|
|
@ -43,13 +43,17 @@ func generateRandomFile(pattern string, length int) (string, []byte, error) {
|
|||
cmd := exec.Command("dd", "bs=1", countArg, "if=/dev/urandom", fmt.Sprintf("of=%s", fileName))
|
||||
err = cmd.Run()
|
||||
|
||||
if err != nil {
|
||||
return "", []byte{}, err
|
||||
}
|
||||
|
||||
contents, err := ioutil.ReadAll(f)
|
||||
if err != nil {
|
||||
return "", []byte{}, err
|
||||
}
|
||||
|
||||
if err := f.Close(); err != nil {
|
||||
return ",", []byte{}, err
|
||||
return "", []byte{}, err
|
||||
}
|
||||
|
||||
return fileName, contents, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue