[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Volker Dobler
On Wednesday, 8 April 2020 18:17:36 UTC+2, Tanmay Das wrote: > > Is this behavior expected? If it is, why did the go authors make such a > decision? I mean making the internet connectivity a dependency for the > execution of a program sounds counter-productive to me, honestly. :( > Well, go run

[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Tanmay Das
Hmm, it makes sense. Still, there should be some caching mechanism. If the internet connection can't be established, load the dep from the cache. On Thursday, April 9, 2020 at 1:14:33 PM UTC+6, Volker Dobler wrote: > > On Wednesday, 8 April 2020 18:17:36 UTC+2, Tanmay Das wrote: >> >> Is this beh

[go-nuts] Re: printing all errors from stdlib as they happen

2020-04-09 Thread Brian Candler
Do you mean the line number *in the library function* ?? In general, I think that's an impossible problem. Consider a somewhat convoluted example of a library function: func Bar(...) { ... if xyz() { blah = true } if abc() { baz = false } ... if blah

[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Brian Candler
On Thursday, 9 April 2020 06:15:22 UTC+1, Tanmay Das wrote: > I also forgot to mention one thing. I was able to build the program using > go build. Even the executable was there. It just didn't run until I > connected to internet. > > When you say "it just didn't run", do you mean with "go run .

[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Tanmay Das
Running the executable: `./helloworld` Also note that, before building the executable, I tried running with `go run`, which of course, failed. I can't even say "Failed" because the go compiler was not throwing any error like *Hey, since I need to download some dependencies even though your prog

[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Brian Candler
On Thursday, 9 April 2020 12:01:31 UTC+1, Tanmay Das wrote: > > Running the executable: `./helloworld` > > OK, then clearly it's not an issue with finding our downloading dependencies: these will all have been resolved by the time the binary has been compiled and linked. Therefore, I think it mu

[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Tanmay Das
> > Therefore, I think it must be some issue with macOS being told to run an > executable it hasn't seen before, making a network connection. > You are probably right. > If you run it once successfully, and then remove the network connection, > does it run again OK? It does. On Thursday, Ap

[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Tanmay Das
Thanks, everyone for your valuable comments. I think Brain is right. It might be an OS-related issue. I really like how active this group is. I look forward to coming back with more topics in the future. Stay Home. Stay Safe. On Wednesday, April 8, 2020 at 10:17:36 PM UTC+6, Tanmay Das wrote: >

Re: [go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Michael Jones
Unable to reproduce the issue on MacOS Mojave 10.14.6, though I tried with gusto. On Thu, Apr 9, 2020 at 4:32 AM Tanmay Das wrote: > Thanks, everyone for your valuable comments. I think Brain is right. It > might be an OS-related issue. I really like how active this group is. I > look forward to

Re: [go-nuts] go run requires internet connection?

2020-04-09 Thread Personal
> On 8 Apr 2020, at 20.00, Tanmay Das wrote: > > Hey Gophers, > My very first post here. > > Today I faced an unexpected power outage and I wanted to tinker with Go a > little bit. I wrote a simple hello world program and ran > go run helloworld.go > > Strangely the code didn't run. In fact

[go-nuts] Re: godoc (golang.org/x/tools/cmd/godoc) has become module-aware

2020-04-09 Thread Nelo Mitranim
Trying and failing to use this. Help would be appreciated. I'm working on a library module outside of GOPATH. The `go.mod` file is present. The `go` commands such as `go test` seem to run in module mode. But when I run `godoc -http=:6060`, it shows the standard library + packages from GOPATH, f

[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Ronny Bangsund
On Thursday, April 9, 2020 at 1:01:31 PM UTC+2, Tanmay Das wrote: > > Running the executable: `./helloworld` > Maybe there's a log entry for your program specifically in Console (the GUI collecting macOS logs), or in one of the system logs. If this is somehow related to GateKeeper, you could tr

[go-nuts] Getting this error: compile: version "go1.13.7" does not match go tool version "go1.12.10"

2020-04-09 Thread Alexander Mills
I have this go.mod file: module github.com/channelmeter/err-id-checker go 1.12 my go version is: *go version go1.12.10 linux/amd64 * my imports just look like this: package main import ( "bufio" "fmt" "io/ioutil" "log" "os" "path/filepath" "regexp" "strings" "sync" ) but when I

Re: [go-nuts] Re: go run requires internet connection?

2020-04-09 Thread David Riley
I feel like it's 10.15 where Apple really started doubling down on their "notarization" service? I haven't updated anything to it because it breaks (by design) a number of things I regularly use, so it would be hard to say, but that has to be frustrating for developers who can't be constantly on

Re: [go-nuts] Getting this error: compile: version "go1.13.7" does not match go tool version "go1.12.10"

2020-04-09 Thread Kurtis Rader
On Thu, Apr 9, 2020 at 12:51 PM Alexander Mills wrote: > my go version is: > > > *go version go1.12.10 linux/amd64* > > but when I run > > > go run . > > *I get this horrendous error that makes no sense:* > > # math/bits > compile: version "go1.13.7" does not match go tool version "go1.12.10" > >

[go-nuts] go commands hang indefinitely

2020-04-09 Thread Juan Monroy-Nieto
Hello everyone, I am compelled to stop just lurking. Go Version 1.14.1 on MacOS Mohave. Similarly to a recent post , commands go build/vet/test/run hang indefinitely for any program including a

Re: [go-nuts] go commands hang indefinitely

2020-04-09 Thread Steven Hartland
What happens if you kill -ABRT the process? On Fri, 10 Apr 2020 at 01:16, Juan Monroy-Nieto wrote: > Hello everyone, I am compelled to stop just lurking. > > Go Version 1.14.1 on MacOS Mohave. > > Similarly to a recent post >

Re: [go-nuts] go commands hang indefinitely

2020-04-09 Thread Kurtis Rader
FWIW, I'm using Go 1.14.1 on macOS Catalina (10.15.4) without issue. The one thing that seems weird in the information you provided is "GOBIN=/bin". Since /bin shouldn't be writable by you that should fail if you attempt a "go install". But that shouldn't affect a simple "go build". Also, having mo

[go-nuts] Is it possible to segment CMD window on Windows and segment Terminal window on Linux with golang?

2020-04-09 Thread 洪嘉鴻
Hello everyone: I use golang with Win10. I want to build executables which can segment terminal window and show different messages on different windows. Besides, I also want the code can also cross-compile for Linux so that it is convenient to maintain. Is it possible to segment CMD window on Win