mirror of
https://github.com/bestnite/sub2clash.git
synced 2025-06-17 12:43:18 +08:00
update
This commit is contained in:
12
main.go
12
main.go
@ -6,14 +6,16 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sub/api"
|
||||
"sub/config"
|
||||
"strconv"
|
||||
"sub2clash/api"
|
||||
"sub2clash/config"
|
||||
_ "sub2clash/config"
|
||||
)
|
||||
|
||||
//go:embed templates/template-meta.yaml
|
||||
//go:embed templates/template_meta.yaml
|
||||
var templateMeta string
|
||||
|
||||
//go:embed templates/template-clash.yaml
|
||||
//go:embed templates/template_clash.yaml
|
||||
var templateClash string
|
||||
|
||||
func writeTemplate(path string, template string) error {
|
||||
@ -75,7 +77,7 @@ func main() {
|
||||
// 设置路由
|
||||
api.SetRoute(r)
|
||||
fmt.Println("Server is running at 8011")
|
||||
err := r.Run(":8011")
|
||||
err := r.Run(":" + strconv.Itoa(config.Default.Port))
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user