tkrajina / typescriptify-golang-structs

A Golang struct to TypeScript class/interface converter
Apache License 2.0
505 stars 87 forks source link

Add `?` to field name if it's a pointer type #30

Closed shackra closed 3 years ago

shackra commented 3 years ago

besides adding ? to the field name when omitempty is present, adds the letter when the field is a pointer type

fixes #29

tkrajina commented 3 years ago

Hi @shackra and thanks for the pull request.

Seems OK to me.

I didn't try it (yet) but I think this will make a couple of tests fail. Can you make sure they all run fine? And also a new test for the other PR (https://github.com/tkrajina/typescriptify-golang-structs/pull/28).

shackra commented 3 years ago

@tkrajina tests added as you requested

tkrajina commented 3 years ago

Merged, thanks!