The question is what you are trying to accomplish - if you want two main packages share variables you could make a third package and have both main packages import that.
/M Den 24. jan. 2019 kl. 07.40 skrev 伊藤和也 <kazya.ito.dr...@gmail.com<mailto:kazya.ito.dr...@gmail.com>>: What Francisco Dalla Rosa Soares says is right. I only compiled "b.go". Is it possible to import "main" package to other packages except "main"? 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<mailto:golang-nuts+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7Ca87cf2ec16bc4fd9d75908d681c6e323%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636839088546315809&sdata=jdioBXyRFjRzAGd3uKq2Ww4jxG5l6lKQLKwUltJCJrk%3D&reserved=0>. -- 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.