forked from OpenPDU/openpdu
new source promoted
This commit is contained in:
@@ -1,19 +1,38 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
// Dictionary definition
|
||||
type Dictionary map[string]interface{}
|
||||
|
||||
func initOutlets() {
|
||||
for _, o := range TheConfig.Outlets {
|
||||
o.PowerInitial()
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
nam := viper.Get("hostname")
|
||||
log.Printf("hostname: %v\n", nam)
|
||||
var err error
|
||||
|
||||
var c1 Configuration
|
||||
|
||||
c1 = createMockConfig()
|
||||
|
||||
err = saveConfig(c1, "t.json")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
TheConfig, err = loadConfig("t.json")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
err = saveConfig(TheConfig, "t1.json")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
startServer()
|
||||
|
||||
}
|
||||
|
||||
// https://github.com/ColorlibHQ/AdminLTE/archive/v2.4.17.tar.gz
|
||||
|
||||
Reference in New Issue
Block a user