Kazuya,

That makes no sense.

The main package is the point of entry to an executable. This is where
things happen.
You create packages that are able to do things and you use them in the main
package to some purpose.

It's going against to the reason why packages are there.

What you're asking is like saying that you want to make your Image
Processing library depend on your program, when the program should depend
on the library

On Thu, Jan 24, 2019 at 4:00 PM 伊藤和也 <kazya.ito.dr...@gmail.com> wrote:

> Is it possible?
>
> package main
>
> var Number int = 100
> func main() {}
>
>
> package hello
>
> import "fmt"
>
> func abc() {
>    fmt.Println(Number)
> }
>
> 2019年1月24日木曜日 11時27分57秒 UTC+9 伊藤和也:
>>
>> package main
>>
>> var Number int = 100
>>
>> func main() {
>>
>> }
>>
>> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

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

Reply via email to