Skip to content

Commit

Permalink
update docstring in go client, better code format (#19268)
Browse files Browse the repository at this point in the history
* update docstring in go client, better code format

* update samples
  • Loading branch information
wing328 authored Jul 30, 2024
1 parent 5d48d22 commit 9a18fc1
Show file tree
Hide file tree
Showing 19 changed files with 4 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,14 @@ func (o *{{classname}}) Set{{name}}(v {{vendorExtensions.x-go-base-type}}) {
{{#useDefaultValuesForRequiredVars}}
{{^isReadOnly}}
{{#defaultValue}}
// GetDefault{{baseName}} function assigns the default value {{defaultValue}} to the {{name}} field
// of the {{classname}} struct and returns the {{{defaultValue}}}.
// GetDefault{{{nameInPascalCase}}} returns the default value {{{defaultValue}}} of the {{{name}}} field.
func (o *{{classname}}) GetDefault{{nameInPascalCase}}() interface{} {
return {{{defaultValue}}}
}
{{/defaultValue}}
{{/isReadOnly}}
{{/useDefaultValuesForRequiredVars}}

{{/useDefaultValuesForRequiredVars}}
{{/required}}
{{^required}}
// Get{{name}} returns the {{name}} field value if set, zero value otherwise{{#isNullable}} (both if not set or set to explicit null){{/isNullable}}.
Expand Down
2 changes: 0 additions & 2 deletions samples/client/echo_api/go-external-refs/model_pet.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions samples/client/echo_api/go/model_pet.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion samples/client/petstore/go/go-petstore/model_animal.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion samples/client/petstore/go/go-petstore/model_category.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion samples/client/petstore/go/go-petstore/model_enum_test_.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions samples/client/petstore/go/go-petstore/model_format_test_.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion samples/client/petstore/go/go-petstore/model_name.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions samples/client/petstore/go/go-petstore/model_pet.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions samples/openapi3/client/petstore/go/go-petstore/model_foo.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9a18fc1

Please sign in to comment.