goext/sq/params.go
Mike Schwörer 55ff89f179
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Has been cancelled
v0.0.572 switch to git.blackforestbytes.com as module name
2025-05-03 16:43:59 +02:00

32 lines
444 B
Go

package sq
import "git.blackforestbytes.com/BlackForestBytes/goext/langext"
type PP map[string]any
func Join(pps ...PP) PP {
r := PP{}
for _, add := range pps {
for k, v := range add {
r[k] = v
}
}
return r
}
func (pp *PP) Add(v any) string {
id := PPID()
(*pp)[id] = v
return id
}
func (pp *PP) AddAll(other PP) {
for id, v := range other {
(*pp)[id] = v
}
}
func PPID() string {
return "p_" + langext.RandBase62(8)
}