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 trialNosherwan S.
Courses Plus Student 10,707 PointsCan anyone give me a hint to this
Looking for a hint. I've already capitalized the t in in total
package sales
var total = 1234.56
package main
import(
"fmt"
"code.my.com/git/sales"
)
func main() {
fmt.Println(sales.Total)
}
1 Answer
Jennifer Nordell
Treehouse TeacherHi there, Nosherwan S.! The total
needs to be capitalized in both places. The package file is sales.go
. Anything inside that that is not capitalized will not be exported so it won't be able to be referenced in the main
package. Make sure to capitalize total
to Total
in both files.
Hope this helps!