mirror of
https://github.com/coder/coder.git
synced 2025-07-23 21:32:07 +00:00
This reverts commit 372fb1f345
.
This commit is contained in:
@@ -441,10 +441,6 @@ func (g *Generator) buildStruct(obj types.Object, st *types.Struct) (string, err
|
||||
jsonOptional bool
|
||||
)
|
||||
if err == nil {
|
||||
if jsonTag.Name == "-" {
|
||||
// Completely ignore this field.
|
||||
continue
|
||||
}
|
||||
jsonName = jsonTag.Name
|
||||
if len(jsonTag.Options) > 0 && jsonTag.Options[0] == "omitempty" {
|
||||
jsonOptional = true
|
||||
|
Reference in New Issue
Block a user