feat: add excel to service list
This commit is contained in:
@@ -12,8 +12,8 @@ import (
|
|||||||
|
|
||||||
// SortByOrder Order items by specified field and a sort type
|
// SortByOrder Order items by specified field and a sort type
|
||||||
// Example: SortByOrder(map[string]string{"name": "ASC"}, &models.Post{})
|
// Example: SortByOrder(map[string]string{"name": "ASC"}, &models.Post{})
|
||||||
// ASC - по возрастанию (от А до Я)
|
// ASC - по возрастанию (или от А до Я)
|
||||||
// DESC - по убыванию (от Я до А)
|
// DESC - по убыванию (или от Я до А)
|
||||||
func SortByOrder[T any](fieldsSortOrder map[string]string, entity T) ([]*T, error) {
|
func SortByOrder[T any](fieldsSortOrder map[string]string, entity T) ([]*T, error) {
|
||||||
var (
|
var (
|
||||||
orderQuery []string
|
orderQuery []string
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -14,7 +14,7 @@ func main() {
|
|||||||
app := application.New(application.Options{
|
app := application.New(application.Options{
|
||||||
Name: "nto_starterkit",
|
Name: "nto_starterkit",
|
||||||
Description: "Toolkit template",
|
Description: "Toolkit template",
|
||||||
Services: append([]application.Service{services.MigratorService}, services.ExportedServices...),
|
Services: append(services.ExportedServices, services.MigratorService, services.ExcelService),
|
||||||
Assets: application.AssetOptions{
|
Assets: application.AssetOptions{
|
||||||
Handler: application.AssetFileServerFS(assets),
|
Handler: application.AssetFileServerFS(assets),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user