main.go 846 B

1234567891011121314151617181920212223242526272829303132333435
  1. package main
  2. import (
  3. "fmt"
  4. "go-admin/cmd"
  5. "go-admin/common/utils"
  6. "os"
  7. "time"
  8. )
  9. //go:generate swag init --parseDependency --parseDepth=6
  10. // @title go-admin API
  11. // @version 2.0.0
  12. // @description 基于Gin + Vue + Element UI的前后端分离权限管理系统的接口文档
  13. // @description 添加qq群: 521386980 进入技术交流群 请先star,谢谢!
  14. // @license.name MIT
  15. // @license.url https://github.com/go-admin-team/go-admin/blob/master/LICENSE.md
  16. // @securityDefinitions.apikey Bearer
  17. // @in header
  18. // @name Authorization
  19. func main() {
  20. prvkey, pubkey := utils.GenRsaKey()
  21. os.WriteFile("id_rsa", prvkey, 0666)
  22. os.WriteFile("id_rsa.pub", pubkey, 0666)
  23. location, err := time.LoadLocation("Asia/Shanghai")
  24. if err != nil {
  25. fmt.Println("Failed to load location:", err)
  26. return
  27. }
  28. time.Local = location
  29. cmd.Execute()
  30. }