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 trialCristian Gerardo Hernandez Barrios
28,382 PointsI'm not sure where is my problem
I fix the problem with the lowercase t of Total, because it's an import, but in the other file--- in sales.go i dont know what is the error...
I triy to change the equal sign to := but gives me an error.
Please help
package sales
var total = 1234.56
package main
import(
"fmt"
"code.my.com/git/sales"
)
func main() {
fmt.Println(sales.Total)
}
2 Answers
Steven Parker
231,275 PointsYou must change the variable name in both places.
So you realized that names that begin with lower-case letters are not exported. But when you rename a variable, you need to change it where it is used and where it is defined.
It looks like you still need to change it in the sales package.
akhter ali
15,778 PointsAs Steven Parker said, you must capitalize the first character of the variable/method you're exporting.
Cristian Gerardo Hernandez Barrios
28,382 PointsYeahhh... thanks buddy! take your best answer :)
Yuval Blass
18,134 PointsYuval Blass
18,134 PointsHi Steven Parker ,
How you made an
underline
text using markdown (Just curious ? )?Thanks,
Yuval Blass.
Joe Purdy
23,237 PointsJoe Purdy
23,237 PointsYou can create underlined text by surrounding a phrase in underscores like this:
_Underlined Text_
-> Underlined TextSteven Parker
231,275 PointsSteven Parker
231,275 PointsHi, yuvalblass. To underline a span, put a single underscore ("
_
") on either side.So, for example:
_this sample_
will become this sample.