From 609cde4c5f1f125461578b2cc0c1f098c1ae2a1a Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期五, 01 十一月 2019 16:13:48 +0800
Subject: [PATCH] fix
---
extend/config/config.go | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/extend/config/config.go b/extend/config/config.go
index 2081b5b..c1a3ff4 100644
--- a/extend/config/config.go
+++ b/extend/config/config.go
@@ -1,10 +1,8 @@
package config
import (
- "log"
- "strconv"
-
"github.com/spf13/viper"
+ "log"
)
type server []ServerInfo
@@ -12,9 +10,9 @@
type ServerInfo struct {
ServerId string `mapstructure: "serverId"`
ServerIp string `mapstructure: "serverIp"`
- VideoPort int `mapstructure: "videoPort"`
+ VideoPort string `mapstructure: "videoPort"`
NginxIp string `mapstructure: "ngxIp"`
- NginxPort int `mapstructure: "ngxPort"`
+ NginxPort string `mapstructure: "ngxPort"`
}
var serverList = &server{}
@@ -32,7 +30,7 @@
}
viper.UnmarshalKey("server", serverList)
for _,s :=range *serverList {
- ServerMap[s.ServerId] = "http://"+s.ServerIp+":"+strconv.Itoa(s.VideoPort)+"/getRecordVideoPath"
- NgxMap[s.ServerId] = "http://"+s.NginxIp+":"+strconv.Itoa(s.NginxPort)+"/videosource"
+ ServerMap[s.ServerId] = "http://"+s.ServerIp+":"+s.VideoPort+"/getRecordVideoPath"
+ NgxMap[s.ServerId] = "http://"+s.NginxIp+":"+s.NginxPort+"/videosource"
}
}
\ No newline at end of file
--
Gitblit v1.8.0