update types

This commit is contained in:
2025-09-04 23:00:57 +04:00
parent 81383d1ea7
commit 7e89fa174b
10 changed files with 466 additions and 20 deletions

View File

@@ -15,11 +15,13 @@ func (params Params) GetValue(key string) *[]string {
return nil
}
func (params *Params) Append(param Param) {
if item := params.GetValue(param.Key); item != nil {
*item = append(*item, param.Value...)
} else {
*params = append(*params, param)
func (params *Params) Append(param ...Param) {
for _, p := range param {
if item := params.GetValue(p.Key); item != nil {
*item = append(*item, p.Value...)
} else {
*params = append(*params, p)
}
}
}