mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 14:45:07 +03:00
import fixes, removed unnecessary code RIVM-11
This commit is contained in:
parent
455bc604c5
commit
fc8f7a4f39
2 changed files with 4 additions and 32 deletions
|
@ -143,20 +143,11 @@ func check(peer string) int64 {
|
||||||
}
|
}
|
||||||
|
|
||||||
func get_user_home_path() string {
|
func get_user_home_path() string {
|
||||||
if runtime.GOOS == "windows" {
|
path, exists := os.LookupEnv("HOME")
|
||||||
path, exists := os.LookupEnv("USERPROFILE")
|
if exists {
|
||||||
if exists {
|
return path
|
||||||
return path
|
|
||||||
} else {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
path, exists := os.LookupEnv("HOME")
|
return ""
|
||||||
if exists {
|
|
||||||
return path
|
|
||||||
} else {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,29 +4,10 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"io/ioutil"
|
|
||||||
"log"
|
|
||||||
"net"
|
|
||||||
"net/url"
|
|
||||||
"os"
|
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
|
||||||
"runtime"
|
|
||||||
"strconv"
|
|
||||||
"strings"
|
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/hjson/hjson-go"
|
|
||||||
"github.com/webview/webview"
|
|
||||||
|
|
||||||
"github.com/RiV-chain/RiV-mesh/src/admin"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var riv_ctrl_path string
|
|
||||||
|
|
||||||
func run_command(command string) []byte {
|
func run_command(command string) []byte {
|
||||||
args := []string{"-json", command}
|
args := []string{"-json", command}
|
||||||
cmd := exec.Command(riv_ctrl_path, args...)
|
cmd := exec.Command(riv_ctrl_path, args...)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue