123456789101112131415161718192021222324252627282930 |
- package main
- import (
- "Cold_MqttAcl/routers"
- "gopkg.in/ini.v1"
- "log"
- )
- var (
- Cfg *ini.File
- Mysql string
- HttpRort string
- )
- func init() {
- var err error
- Cfg, err = ini.Load("config.ini")
- if err != nil {
- log.Fatalf("Fail to parse 'config.ini': %v", err)
- }
- Mysql = Cfg.Section("service").Key("Mysql").String()
- HttpRort = Cfg.Section("service").Key("HttpRort").String()
- }
- func main() {
- //println(routers.WeekByDate() + routers.GetRandstring(10,"0123456789123456789",int64(0)))
- routers.Gininit(HttpRort, Mysql)
- }
|