new
new
This commit is contained in:
2
.vscode/settings.json
vendored
Normal file
2
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
{
|
||||||
|
}
|
||||||
@@ -2,7 +2,9 @@ package config
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"public/tools"
|
|
||||||
|
"github.com/xie1xiao1jun/public/dev"
|
||||||
|
"github.com/xie1xiao1jun/public/tools"
|
||||||
|
|
||||||
"github.com/BurntSushi/toml"
|
"github.com/BurntSushi/toml"
|
||||||
)
|
)
|
||||||
@@ -20,6 +22,7 @@ var _map = Config{}
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
onInit()
|
onInit()
|
||||||
|
dev.OnSetDev(_map.IsDev)
|
||||||
}
|
}
|
||||||
|
|
||||||
func onInit() {
|
func onInit() {
|
||||||
@@ -31,11 +34,6 @@ func onInit() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//OnIsDev ... 是否是开发版本
|
|
||||||
func OnIsDev() bool {
|
|
||||||
return _map.IsDev
|
|
||||||
}
|
|
||||||
|
|
||||||
//InitFile ...
|
//InitFile ...
|
||||||
func InitFile(filename string) error {
|
func InitFile(filename string) error {
|
||||||
if _, err := toml.DecodeFile(filename, &_map); err != nil {
|
if _, err := toml.DecodeFile(filename, &_map); err != nil {
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ func Execute() {
|
|||||||
rows.Scan(&table)
|
rows.Scan(&table)
|
||||||
tables = append(tables, table)
|
tables = append(tables, table)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println(tables)
|
fmt.Println(tables)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user