goext/sq/params.go
Mike Schwörer 9e586f7706
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Has been cancelled
v0.0.389
2024-02-21 16:10:28 +01:00

32 lines
438 B
Go

package sq
import "gogs.mikescher.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)
}