mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 09:48:49 +02:00
refactor(config): add omitempty on some fields
This commit is contained in:
@@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user