This commit is contained in:
2024-08-02 14:19:57 +08:00
parent c178e1672b
commit 527c7aa372
18 changed files with 904 additions and 0 deletions

24
main.go Normal file
View File

@@ -0,0 +1,24 @@
package main
import (
"fmt"
"github.com/gin-gonic/gin"
"iptv/core"
)
func main() {
core.UpdateFmmIpv6M3u()
//core.UpdateFmmIpv6ToTxtM3u()
core.CronRegister("0 */5 * * * ?", core.UpdateFmmIpv6M3u)
core.CronRegister("0 */2 * * * ?", core.UpdateFmmIpv6ToTxtM3u)
core.CronRun()
gin.SetMode(gin.ReleaseMode)
r := gin.Default()
r.GET("/ipv6-iptv.m3u", core.HandlerIpv6M3u)
r.GET("/diyp-ipv6-iptv.m3u", core.HandlerDiypIpv6IptvM3u)
err := r.Run("0.0.0.0:6677")
if err != nil {
fmt.Printf("gin服务启动失败%s\n", err.Error())
return
}
}