update fmt, and asset target
This commit is contained in:
10
Makefile
10
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
|
||||
|
20
main.go
20
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()
|
||||
|
Reference in New Issue
Block a user