refactor(config): add omitempty on some fields

This commit is contained in:
yusing
2025-10-10 10:34:49 +08:00
parent 9bf7a0beef
commit c93a460043
2 changed files with 2 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ import (
type ( type (
FieldConfig struct { FieldConfig struct {
Default FieldMode `json:"default" validate:"omitempty,oneof=keep drop redact"` Default FieldMode `json:"default" validate:"omitempty,oneof=keep drop redact"`
Config map[string]FieldMode `json:"config" validate:"dive,oneof=keep drop redact"` Config map[string]FieldMode `json:"config,omitempty" yaml:"config,omitempty" validate:"dive,oneof=keep drop redact"`
} }
FieldMode string FieldMode string
) )

View File

@@ -13,7 +13,7 @@ import (
type ( type (
LogFilter[T Filterable] struct { LogFilter[T Filterable] struct {
Negative bool Negative bool
Values []T Values []T `json:",omitempty"`
} // @name LogFilter } // @name LogFilter
Filterable interface { Filterable interface {
comparable comparable