fix if-return redundant if ...; err != nil check lint

This commit is contained in:
Benjamin Elder
2023-08-24 14:45:20 -07:00
parent 7c050103fd
commit 5f59a835fa
2 changed files with 2 additions and 8 deletions

View File

@@ -403,10 +403,7 @@ func generatePortMappings(clusterIPFamily config.ClusterIPFamily, portMappings .
}
func createContainer(name string, args []string) error {
if err := exec.Command("docker", append([]string{"run", "--name", name}, args...)...).Run(); err != nil {
return err
}
return nil
return exec.Command("docker", append([]string{"run", "--name", name}, args...)...).Run()
}
func createContainerWithWaitUntilSystemdReachesMultiUserSystem(name string, args []string) error {

View File

@@ -421,10 +421,7 @@ func generatePortMappings(clusterIPFamily config.ClusterIPFamily, portMappings .
}
func createContainer(name string, args []string) error {
if err := exec.Command("podman", append([]string{"run", "--name", name}, args...)...).Run(); err != nil {
return err
}
return nil
return exec.Command("podman", append([]string{"run", "--name", name}, args...)...).Run()
}
func createContainerWithWaitUntilSystemdReachesMultiUserSystem(name string, args []string) error {