parameter 'appName' seems to be unused, consider removing or renaming it as _
161 return nil
162}
163
164func confirmVolumeCreate(ctx context.Context, appName string) (bool, error) {165 volumeName := flag.FirstArg(ctx)
166
167 // If the Yes flag has been supplied we skip the warning entirely, so no
parameter 'ctx' seems to be unused, consider removing or renaming it as _
591 }
592}
593
594func resolveForkFromVolume(ctx context.Context, machines []*fly.Machine) (string, error) {595 if len(machines) == 0 {
596 return "", fmt.Errorf("No machines associated with fork-from target. See `fly pg create --help` for more information")
597 }
Description
Unused parameters in functions or methods should be replaced with _
(underscore) or removed.
Functions or methods with unused parameters can be a symptom of unfinished
refactoring or a bug. If an unused parameter is present, it should be named _
(underscore) to avoid raising this issue and better readability.
Bad practice
func abc(unused string) {
fmt.Println("Not using any passed params.")
}
Recommended
func abc(_ string) {
fmt.Println("Not using any passed params.")
}
func abc() {
fmt.Println("Not using any passed params.")
}