Compatibility with golang 1.6

This commit is contained in:
chteufleur 2016-04-19 20:39:04 +02:00
parent a601d25b35
commit 26baa07126
9 changed files with 10 additions and 10 deletions

View File

@ -44,7 +44,7 @@ func (c *MainController) Prepare() {
func (c *MainController) Get() {
c.Data["sensors"] = getLastTemps()
c.TplNames = "index.tpl"
c.TplName = "index.tpl"
}
func getLastTemps() []SensorPrint {

View File

@ -27,7 +27,7 @@ func (c *LoginController) Get() {
return
}
c.TplNames = "login.tpl"
c.TplName = "login.tpl"
}
func (c *LoginController) Post() {

View File

@ -45,7 +45,7 @@ func (c *ViewRelayController) Get() {
}
}
c.TplNames = "relay.tpl"
c.TplName = "relay.tpl"
}
func (c *ViewRelayController) Post() {

View File

@ -36,7 +36,7 @@ func (c *SensorsController) Get() {
c.Data["sensors"] = sensors
c.Data["relays"] = relays
c.Data["compteurs"] = compteurs
c.TplNames = "sensors.tpl"
c.TplName = "sensors.tpl"
}
func (c *SensorsController) Post() {

View File

@ -69,7 +69,7 @@ func (c *ViewTeleinfoController) Get() {
c.Data["dataPower"] = template.JS(dataPower)
}
c.TplNames = "teleinfo.tpl"
c.TplName = "teleinfo.tpl"
}

View File

@ -24,7 +24,7 @@ func (c *UserController) Prepare() {
}
func (c *UserController) Get() {
c.TplNames = "user.tpl"
c.TplName = "user.tpl"
}
func (c *UserController) Post() {

View File

@ -32,7 +32,7 @@ func (c *WebSocketController) Prepare() {
// Get method handles GET requests for WebSocketController.
func (c *WebSocketController) Get() {
c.Data["hostWS"] = "ws://"+c.Ctx.Request.Host+variables.WebSocketLogRoute
c.TplNames = "watchlog.tpl"
c.TplName = "watchlog.tpl"
}

View File

@ -41,7 +41,7 @@ func (c *ViewTempController) Get() {
}
c.Data["dataTemp"] = template.JS(dataTemp)
c.TplNames = "temp.tpl"
c.TplName = "temp.tpl"
}
/*

View File

@ -29,12 +29,12 @@ func init() {
db := ""
if database.DatabaseInstance == database.MySQL {
// MySQL
orm.RegisterDriver(database.MySQL, orm.DR_MySQL)
orm.RegisterDriver(database.MySQL, orm.DRMySQL)
url = database.UserDB + ":" + database.PwdDB + "@/" + database.DataBase + "?charset=utf8"
db = "mysql"
} else {
// SQLite
orm.RegisterDriver(database.SQLITE, orm.DR_Sqlite)
orm.RegisterDriver(database.SQLITE, orm.DRSqlite)
url = "datahouse.db"
db = "sqlite3"
}