Converting to objects
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"local/args"
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
@@ -33,7 +34,8 @@ func Refresh() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
wrap := as.Get("wrap").String()
|
||||
wrap := as.Get("wrap").GetString()
|
||||
log.Printf("reading %v (%T)", wrap, wrap)
|
||||
b, err := ioutil.ReadFile(wrap)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@@ -43,8 +45,8 @@ func Refresh() {
|
||||
panic(len(bs))
|
||||
}
|
||||
|
||||
Root = as.Get("root").String()
|
||||
Port = ":" + strings.TrimPrefix(as.Get("port").String(), ":")
|
||||
Root = as.Get("root").GetString()
|
||||
Port = ":" + strings.TrimPrefix(as.Get("port").GetString(), ":")
|
||||
Head = string(bs[0])
|
||||
Foot = string(bs[1])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user