From 00fcecd433a0c121b48b8037084c84ea448fe5e5 Mon Sep 17 00:00:00 2001 From: idk Date: Tue, 4 Aug 2020 00:31:08 -0400 Subject: [PATCH] update fmt, and asset target --- Makefile | 10 ++++++++-- main.go | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 2dffdc7..3488f7b 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ GO_COMPILER_OPTS = -a -tags netgo -ldflags '-w -extldflags "-static"' build: go build $(GO_COMPILER_OPTS) -assets: fmt assets.go +assets: fmt lib/assets.go gen: go run $(GO_COMPILER_OPTS) -tags generate gen.go extensions.go @@ -25,6 +25,12 @@ clean: fmt fmt: gofmt -w -s *.go + gofmt -w -s \ + lib/firefox.go + lib/pure.go + lib/pureextensions.go + lib/variant.go + lib/variantextensions.go sum: sha256sum ifox/i2ppb@eyedeekay.github.io.xpi @@ -35,7 +41,7 @@ sum: all: pure variant -pure: fmt assets.go windows osx linux +pure: fmt lib/assets.go windows osx linux windows: fmt GOOS=windows go build $(GO_COMPILER_OPTS) -o i2pfirefox.exe diff --git a/main.go b/main.go index 0575094..8fac31f 100644 --- a/main.go +++ b/main.go @@ -60,15 +60,15 @@ func hello() error { return nil } -func proxyCheck() bool{ - conn, err := net.Dial("tcp4", "localhost:4444") - log.Println("Doing dial check") - if err != nil { - return false - } - log.Println("Dial check true, proxy is up") - defer conn.Close() - return true +func proxyCheck() bool { + conn, err := net.Dial("tcp4", "localhost:4444") + log.Println("Doing dial check") + if err != nil { + return false + } + log.Println("Dial check true, proxy is up") + defer conn.Close() + return true } func main() { @@ -101,7 +101,7 @@ func main() { } time.Sleep(time.Second * 2) if !proxyCheck() { - go proxyMain(ctx) + go proxyMain(ctx) } if !*chromium { firefoxMain()