Empty slice literal used to declare a variable GO-W1027
Anti-pattern
Minor
6 months agoa year old
Empty slice literal of type "[][]string" used to define "sqlIndexes"
 59
 60		columns := make([]string, 0, len(mi.Fields.FieldsDB))
 61
 62		sqlIndexes := [][]string{} 63		var commentIndexes []int // store comment indexes for postgres
 64
 65		for i, fi := range mi.Fields.FieldsDB {
Empty slice literal of type "[]string" used to define "fileExts"
668
669	if sgz, err := ac.String("StaticExtensionsToGzip"); sgz != "" && err == nil {
670		extensions := strings.Split(sgz, ",")
671		fileExts := []string{}672		for _, ext := range extensions {
673			ext = strings.TrimSpace(ext)
674			if ext == "" {
Empty slice literal of type "[]string" used to define "params"
494		var param []rune
495		var expt []rune
496		var skipnum int
497		params := []string{}498		reg := regexp.MustCompile(`[a-zA-Z0-9_]+`)
499		for i, v := range key {
500			if skipnum > 0 {
Empty slice literal of type "[]string" used to define "options"
44}
45
46func (mp *MethodParam) String() string {
47	options := []string{}48	result := "param.New(\"" + mp.name + "\""
49	if mp.required {
50		options = append(options, "param.IsRequired")
Empty slice literal of type "[]sliceValue" used to define "sliceValues"
587func (input *BeegoInput) bindSlice(params *url.Values, key string, typ reflect.Type) reflect.Value {
588	maxIndex := -1
589	numNoIndex := 0
590	sliceValues := []sliceValue{}591	for reqKey, vals := range *params {
592		if !strings.HasPrefix(reqKey, key+"[") {
593			continue