entc/gen: use empty slice instead of nil in sqlAll (#310)

This commit is contained in:
aca
2020-01-23 23:16:21 +09:00
committed by Ariel Mashraki
parent 3b26600834
commit 3ee6223e64
50 changed files with 119 additions and 119 deletions

View File

@@ -18,7 +18,7 @@ in the LICENSE file in the root directory of this source tree.
func ({{ $receiver }} *{{ $builder }}) sqlAll(ctx context.Context) ([]*{{ $.Name }}, error) {
var (
nodes []*{{ $.Name }}
nodes []*{{ $.Name }} = []*{{ $.Name }}{}
{{- with $.ForeignKeys }}
withFKs = {{ $receiver }}.withFKs
{{- end }}