Re: [go-nuts] Question about 'import' statement

2020-02-03 Thread Ian Lance Taylor
On Mon, Feb 3, 2020 at 11:40 AM joe mcguckin wrote: > > Do all the files listed in the 'import' statement get pulled in and compiled, > or merely scanned to resolve function references etc. > > As someone who grew up on 'C', it seems a bit weird to not have an 'include' > mechanism and its heade

Re: [go-nuts] Question about 'import' statement

2020-02-03 Thread Brian Candler
Also, I believe "go fmt" sorts the imports. -- 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 t

Re: [go-nuts] Question about 'import' statement

2020-02-03 Thread Marcin Romaszewicz
All the files get downloaded to your $GOPATH/src or $GOPATH/pkg, depending on whether modules are enabled. Everything gets compiled together into the same static executable, so yes, the files get compiled. The order of imports should not matter in well written code, but you can always create scen

[go-nuts] Question about 'import' statement

2020-02-03 Thread joe mcguckin
Do all the files listed in the 'import' statement get pulled in and compiled, or merely scanned to resolve function references etc. As someone who grew up on 'C', it seems a bit weird to not have an 'include' mechanism and its headers. Does the it matter what order the files appear in the impor