Files
quyun-v2/backend/app/requests/label.go
2025-12-18 10:27:40 +08:00

14 lines
378 B
Go

package requests
// KV is a generic key-value response item, commonly used for label/value enums.
type KV struct {
// Key is a machine-readable value, usually an enum string.
Key string `json:"key,omitempty"`
// Value is the label payload, often a human-readable string.
Value any `json:"value,omitempty"`
}
func NewKV(k string, v any) KV {
return KV{Key: k, Value: v}
}