1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- package main
- import (
- "fmt"
- "go-admin/cmd"
- "go-admin/common/utils"
- "log"
- "net/http"
- _ "net/http/pprof"
- "os"
- "time"
- )
- //go:generate swag init --parseDependency --parseDepth=6
- // @title go-admin API
- // @version 2.0.0
- // @description 基于Gin + Vue + Element UI的前后端分离权限管理系统的接口文档
- // @description 添加qq群: 521386980 进入技术交流群 请先star,谢谢!
- // @license.name MIT
- // @license.url https://github.com/go-admin-team/go-admin/blob/master/LICENSE.md
- // @securityDefinitions.apikey Bearer
- // @in header
- // @name Authorization
- func main() {
- go func() {
- if err := http.ListenAndServe(":8001", nil); err != nil {
- log.Fatal(err)
- }
- }()
- prvkey, pubkey := utils.GenRsaKey()
- os.WriteFile("id_rsa", prvkey, 0666)
- os.WriteFile("id_rsa.pub", pubkey, 0666)
- location, err := time.LoadLocation("Asia/Shanghai")
- if err != nil {
- fmt.Println("Failed to load location:", err)
- return
- }
- time.Local = location
- cmd.Execute()
- }
|