diff options
| author | Jeff Carr <[email protected]> | 2024-03-09 18:05:49 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-03-09 18:05:49 -0600 |
| commit | efba612ad6ea1e9611ed82e7c2f2a497c16d7a82 (patch) | |
| tree | fc5d5f04b92cbac4352e8ea33e7bfcb5a2e5794d | |
| parent | 316c1b8cc270d5d743843fb2518b14b5fd6f9b73 (diff) | |
use os.Hostname()v0.22.1
| -rw-r--r-- | listWindow.go | 4 | ||||
| -rw-r--r-- | register.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/listWindow.go b/listWindow.go index 87216ff..6290c99 100644 --- a/listWindow.go +++ b/listWindow.go @@ -23,7 +23,7 @@ var lw *gadgets.BasicWindow var allsections []*section type witRepo struct { - hidden bool + hidden bool sec *section path *gui.Node downloadB *gui.Node @@ -108,7 +108,7 @@ func ListWindow(view *repolist.RepoList) *gadgets.BasicWindow { var lines []string var currents *section - currents = NewSection(group, "local " + view.Cfgfile()) + currents = NewSection(group, "local "+view.Cfgfile()) for i, line := range myrepolist(view.Cfgfile()) { line = strings.TrimSpace(line) if line == "" { diff --git a/register.go b/register.go index c57c550..66f3419 100644 --- a/register.go +++ b/register.go @@ -4,10 +4,10 @@ import ( "bytes" "io/ioutil" "net/http" + "os" "os/user" "strings" - "go.wit.com/lib/gui/shell" "go.wit.com/log" ) @@ -25,7 +25,7 @@ func Register(gopath string, giturl string) bool { req.Header.Set("giturl", giturl) usr, _ := user.Current() req.Header.Set("author", usr.Username) - hostname := shell.RunCapture("hostname -f") + hostname, _ := os.Hostname() req.Header.Set("hostname", hostname) client := &http.Client{} |
