14 lines
378 B
Go
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}
|
|
}
|