main.go 914 B

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