FAQ
According to the spec, you can not guarantee any order of init calls. The
only thing you can be sure of is that all init calls will happen before
main is called.

A good way to do what you want is, for example, the way database/sql works
-- it exposes a method you can call to update its internal state. If
package B in your example does not provide such a method, then this doesn't
help you.

What exactly is package B, and what exactly do you wish to do that requires
execution prior to B's init?

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 17, '14 at 11:38a
activeAug 17, '14 at 3:06p
posts2
users2
websitegolang.org

2 users in discussion

Shawn Milochik: 1 post Val: 1 post

People

Translate

site design / logo © 2022 Grokbase