On Wed, Apr 8, 2020 at 9:17 AM Tanmay Das <tanmaymi...@gmail.com> 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, the terminal prompt never exited. I 
> kept running the same command over and over again but no luck. I checked all 
> my configurations, my env vars, etc. and everything was ok. After ruling out 
> all the possibilities it suddenly hit me: what if Go actually requires an 
> internet connection to run a program for no apparent reason? I waited for the 
> electricity to come back and as soon as I was connected to the internet I ran 
> `go run` command again and voilà!
>
> 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. :(

An Internet connection is not required in general.  But it is required
if you import packages that are not part of the standard library.
What was your program?  What version of Go were you using?  What is
the output of "go env"?

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVFDdjwwxyBurNpgUAtQAXtopA%2B5Rivw6r4L9KL99a0LA%40mail.gmail.com.

Reply via email to