3
0

Prevent codegen from doing empty type() when no struct is defined

This commit is contained in:
Denis Arh 2018-07-19 22:32:54 +02:00
parent 031cc24a73
commit c11a1a74d1
2 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,8 @@ import (
)
{/if}
{if !empty($structs)}
type ({foreach $structs as $struct}
{if strpos($name, "Literal") !== false}
@ -28,6 +30,7 @@ type ({foreach $structs as $struct}
{/if}{/foreach}
)
{/if}
{foreach $structs as $struct}
// New constructs a new instance of {struct.name}

View File

@ -14,5 +14,3 @@ package types
implement your API calls, helper functions and tests. The file `auth.go`
is only generated the first time, and will not be overwritten if it exists.
*/
type ()