forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Go][client] make structure members pointers, provide custom marshall…
…ing. Fixes OpenAPITools#522
- Loading branch information
Slavek Kabrda
committed
Jun 13, 2019
1 parent
19f47d0
commit 09568ce
Showing
195 changed files
with
21,441 additions
and
691 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
modules/openapi-generator/src/main/resources/go/utils.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{{>partial_header}} | ||
package {{packageName}} | ||
|
||
import "time" | ||
|
||
// Bool is a helper routine that returns a pointer to given integer value. | ||
func Bool(v bool) *bool { return &v } | ||
|
||
// Int is a helper routine that returns a pointer to given integer value. | ||
func Int(v int) *int { return &v } | ||
|
||
// Int32 is a helper routine that returns a pointer to given integer value. | ||
func Int32(v int32) *int32 { return &v } | ||
|
||
// Int64 is a helper routine that returns a pointer to given integer value. | ||
func Int64(v int64) *int64 { return &v } | ||
|
||
// Float is a helper routine that returns a pointer to given float value. | ||
func Float(v float32) *float32 { return &v } | ||
|
||
// Float32 is a helper routine that returns a pointer to given float value. | ||
func Float32(v float32) *float32 { return &v } | ||
|
||
// Float64 is a helper routine that returns a pointer to given float value. | ||
func Float64(v float64) *float64 { return &v } | ||
|
||
// String is a helper routine that returns a pointer to given string value. | ||
func String(v string) *string { return &v } | ||
|
||
// Time is helper routine that returns a pointer to given Time value. | ||
func Time(v time.Time) *time.Time { return &v } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.