A bunch of CLI work

This commit is contained in:
Adam Ierymenko 2019-09-30 16:12:08 -07:00
parent c4504fd3ff
commit 7fc78129f4
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
19 changed files with 225 additions and 153 deletions

View file

@ -14,9 +14,9 @@
package cli
import (
"encoding/json"
"fmt"
"os"
"zerotier/pkg/zerotier"
)
@ -26,8 +26,7 @@ func Status(basePath, authToken string, args []string, jsonOutput bool) {
apiGet(basePath, authToken, "/status", &status)
if jsonOutput {
j, _ := json.MarshalIndent(&status, "", " ")
fmt.Println(string(j))
fmt.Println(jsonDump(&status))
} else {
online := "ONLINE"
if !status.Online {