Revert "feat: Support config files with viper (#4558)" (#4692)

This reverts commit c8e299c8f1.
This commit is contained in:
Garrett Delfosse
2022-10-21 16:04:27 -04:00
committed by GitHub
parent 0d27b59ebb
commit a2fb444911
35 changed files with 1089 additions and 920 deletions

View File

@ -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