start unmarshalling of config file
This commit is contained in:
parent
e62f47dee0
commit
3cce9fa63e
11
add.go
11
add.go
@ -1,5 +1,14 @@
|
|||||||
package dsnet
|
package dsnet
|
||||||
|
|
||||||
func Add(hostname string, owner string, description string, publicKey string) {
|
import (
|
||||||
|
"io/ioutil"
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Add(hostname string, owner string, description string, publicKey string) {
|
||||||
|
raw, err := ioutil.ReadFile(CONFIG_FILE)
|
||||||
|
check(err)
|
||||||
|
conf := DsnetConfig{}
|
||||||
|
err = json.Unmarshal(raw, &conf)
|
||||||
|
check(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user