On Wed, Apr 20, 2016 at 10:49 AM, Carlos E. Muñoz wrote:

Hi, maybe it's a noob error but I can't find the solution.

This is the situation, I've a global variable in my main package and I
need to change the value with other package.

Maybe this little code can explain the issue a bit better

Why do you think you need to change a global variable in package "main"
from an imported package? Imported packages can never be expected to know
about things in main.

You can do what you want by (in main) doing: JumpFirst =
And have ChangeFlag return a value.

Also, package names are lower-case by convention.

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


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 7 | next ›
Discussion Overview
groupgolang-nuts @
postedApr 20, '16 at 7:07p
activeApr 21, '16 at 4:05p



site design / logo © 2021 Grokbase