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 {
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 == "" {
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 {
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")
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
An empty slice can be represented by nil
or an empty slice literal. They are
functionally equivalent — their len
and cap
are both zero — but the nil
slice is the preferred style. For more information about empty slices,
see Declaring Empty Slices.
package main
func foo() {
a := []int{}
}
package main
func foo() {
var a []int
}