feat: job list

This commit is contained in:
Samuel N Cui
2023-08-29 18:02:57 +08:00
parent cda9244e8e
commit 852cf8212e
80 changed files with 6173 additions and 1854 deletions

15
tools/cache.go Normal file
View File

@@ -0,0 +1,15 @@
package tools
func Cache[i comparable, o any](f func(in i) o) func(in i) o {
cache := make(map[i]o, 0)
return func(in i) o {
cached, has := cache[in]
if has {
return cached
}
out := f(in)
cache[in] = out
return out
}
}