From c51c525f310862476f833cda170d14287cc6157c Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Thu, 10 Jun 2021 11:33:13 +0800 Subject: [PATCH] update for reflect --- modelgen/table.go | 2 +- modelgen/table_test.go | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modelgen/table.go b/modelgen/table.go index 32305972..e245910b 100644 --- a/modelgen/table.go +++ b/modelgen/table.go @@ -25,7 +25,7 @@ package {{ index . "PackageName" }} {{ if index . "Enums" }} type ( {{ range index . "Enums" }} -{{ .Alias }} {{ .Type }} +{{ .Alias }} = {{ .Type }} {{- end }} ) diff --git a/modelgen/table_test.go b/modelgen/table_test.go index 7aa08221..1b129094 100644 --- a/modelgen/table_test.go +++ b/modelgen/table_test.go @@ -53,8 +53,8 @@ func TestNewTableTemplate(t *testing.T) { package test type ( - AtomicTableEventType string - AtomicTableProtocol string + AtomicTableEventType = string + AtomicTableProtocol = string ) const ( @@ -91,8 +91,8 @@ type AtomicTable struct { package test type ( - AtomicTableEventType string - AtomicTableProtocol string + AtomicTableEventType = string + AtomicTableProtocol = string ) const ( @@ -140,8 +140,8 @@ func {{ index . "TestName" }} () string { package test type ( - AtomicTableEventType string - AtomicTableProtocol string + AtomicTableEventType = string + AtomicTableProtocol = string ) const (