Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialgalhardoo
19,272 PointsWhere's wrong here? :c
I have tried a twenty times and I can't figure out where is wrong
package sales
var total = 1234.56
package main
import(
"fmt"
"src/code.my.com/git/sales"
)
func main() {
fmt.Println(sales.total)
}
1 Answer
Jeff Muday
Treehouse Moderator 28,720 PointsIn Go, you have to capitalize the first letter of a variable in order for it to be visible (public) between different modules.
Thus, you will need to capitalize the first letter in 'total' in both sales.go and report.go files.
Go is a cool language, I think you're going to enjoy it!
galhardoo
19,272 Pointsgalhardoo
19,272 PointsThanks a lot Jeff, I'm completely enjoying learn go :D