Closed S-YOU closed 4 years ago
AFAIK no one use custom-type-package, custom-types-file is used instead for the purposes.
I see some applications in my company uses custom-types-file to generate repository layer by fully customizing templates. Though the current implementation of custom-types-file is very hacky and hard to maintain the behavior. So I think I will change it in the future. If you use the feature, please keep it in mind.
ok, I also noticed that you can use EncodeSpanner/DecodeSpanner features to convert between Go/Spanner types, .CustomType
is not actually needed in my use case.
Yes the recent version of google cloud go supports Encoder/Decoder, we can go a different way to customize models.
I would like to access custom-type-package name provided in command line. Use case is to separate model / repository layer, yo works out of the box, but this custom-type-package, I couldn't figure out how to access. Of course I could hard-code it since I know the name, but if there is way to access the custom-type-package name in templates that would be more flexible. Thanks.