Skip to content

Commit

Permalink
ensure that host is correct on Windows, OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedeekay committed Jan 25, 2023
1 parent c4deb14 commit dab23c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
9 changes: 0 additions & 9 deletions lv.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,13 @@
package main

import (
"fmt"
"log"
"os"
"strings"

goi2pbrowser "github.com/eyedeekay/go-i2pbrowser"
"i2pgit.org/idk/railroad/configuration"
)

func addrString(addr string) string {
if strings.HasPrefix(addr, ":") {
return fmt.Sprintf("127.0.0.1%s", addr)
}
return addr
}

func LaunchView() error {
if err := os.Setenv("NO_PROXY", "127.0.0.1:7672"); err != nil {
return err
Expand Down
7 changes: 7 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,3 +507,10 @@ func main() {
}
}
}

func addrString(addr string) string {
if strings.HasPrefix(addr, ":") {
return fmt.Sprintf("127.0.0.1%s", addr)
}
return addr
}

0 comments on commit dab23c0

Please sign in to comment.