Skip to content

Commit

Permalink
Fixed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronnie Lazar committed Oct 30, 2019
1 parent 763db72 commit fd4b65d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions internal/queryset/generator/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ const qsCode = `
}
}
func (qs {{ .Name }}) w(db *gorm.DB) {{ .Name }} {
func (qs {{ .Name }}) w(db *gorm.DB) {{ .Name }} {
return New{{ .Name }}(db)
}
func (qs {{ .Name }}) Select(fields ...{{ $ft }}) {{ .Name }} {
names := []string{}
for _, f := range fields {
names = append(names, f.String())
}
func (qs {{ .Name }}) Select(fields ...{{ $ft }}) {{ .Name }} {
names := []string{}
for _, f := range fields {
names = append(names, f.String())
}
return qs.w(qs.db.Select(strings.Join(names, ",")))
}
return qs.w(qs.db.Select(strings.Join(names, ",")))
}
{{ range .Methods }}
{{ .GetDoc .GetMethodName }}
Expand Down

0 comments on commit fd4b65d

Please sign in to comment.