Grokking Advanced Go
0% completed
Modules and go mod
This program prints an order total with thousands separators, using a package from outside the standard library. The code is correct, and it does not build.
// file: main.go package main import ( "golang.org/x/text/language" "golang.org/x/text/message" ) func main() { var total int64 = 1234567 p := message.NewPrinter(language.English) p.Printf("Order 1001 total: %d cents\n", total) }
main.go:6:2: no required module provides package golang.org/x/text/language; to add it: go get golang.org/x/text/language main.go:7:2: no required module provides package golang
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%