package main import ( "dhcp/initialize" "os" "os/signal" "syscall" ) // @title smee // @version 1.0 // @description ipxe管理. // @securityDefinitions.apikey ApiKeyAuth // @in header // @name Authorization func main() { // 初始化日志 initialize.InitLogger("info") //初始化http服务 r := initialize.InitRouter() if err := r.Run("0.0.0.0:9999"); err != nil { panic(err) } //优雅退出 quit := make(chan os.Signal) signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM) <-quit }