forked from mirrors/homebox
feat: maintenance log (#170)
* remove repo for document tokens * remove schema for doc tokens * fix id template and generate cmd * schema updates * code gen * bump dependencies * fix broken migrations + add maintenance entry type * spelling * remove debug logger * implement repository layer * routes * API client * wip: maintenance log * remove depreciated call
This commit is contained in:
parent
d6da63187b
commit
5bbb969763
79 changed files with 6320 additions and 4957 deletions
|
@ -16,17 +16,16 @@ func mapTErrFunc[T any, Y any](fn func(T) Y) func(T, error) (Y, error) {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Future Usage
|
||||
// func mapEachFunc[T any, Y any](fn func(T) Y) func([]T) []Y {
|
||||
// return func(items []T) []Y {
|
||||
// result := make([]Y, len(items))
|
||||
// for i, item := range items {
|
||||
// result[i] = fn(item)
|
||||
// }
|
||||
func mapTEachFunc[T any, Y any](fn func(T) Y) func([]T) []Y {
|
||||
return func(items []T) []Y {
|
||||
result := make([]Y, len(items))
|
||||
for i, item := range items {
|
||||
result[i] = fn(item)
|
||||
}
|
||||
|
||||
// return result
|
||||
// }
|
||||
// }
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
func mapTEachErrFunc[T any, Y any](fn func(T) Y) func([]T, error) ([]Y, error) {
|
||||
return func(items []T, err error) ([]Y, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue