parameter 'expand' seems to be unused, consider removing or renaming it as _
150// TODO:
151//
152// add range value validation
153func newGlobState(expr string, expand func(globs []string) ([]string, error)) (*gmatcher, error) { 154 var m = gmatcher{root: &gstate{}, exact: true, expr: expr}
155 var cur = m.root
156 var alters [][2]*gstate
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.")
}