goext/sq/params.go

26 lines
355 B
Go
Raw Normal View History

2022-12-07 23:21:36 +01:00
package sq
2024-01-05 16:53:14 +01:00
import "gogs.mikescher.com/BlackForestBytes/goext/langext"
2022-12-07 23:21:36 +01:00
type PP map[string]any
2022-12-24 01:14:58 +01:00
func Join(pps ...PP) PP {
r := PP{}
for _, add := range pps {
for k, v := range add {
r[k] = v
}
}
return r
}
2024-01-05 16:53:14 +01:00
func (pp *PP) Add(v any) string {
id := PPID()
(*pp)[id] = v
return id
}
func PPID() string {
return "p_" + langext.RandBase62(8)
}