I am new to go, just learing.
I was trying to add reference so that I can run the following program , Please find the link
Here in import this following line is througing error “github.com/golang/freetype”, “golang.org/x/image/font”
How to resolve this…
How do you try to build and run this program? What exact error do you get?
I am using gogland from jetbrain editor.
by using the terminal i was using following command
C:\Users\Administrator\GoglandProjects\awesomeProject\src\main>go build main.go
main.go:14:2: cannot find package “github.com/golang/freetype” in any of:
C:\Go\src\github.com\golang\freetype (from $GOROOT)
C:\Users\Administrator\GoglandProjects\awesomeProject\src\github .com\golang\freetype (from $GOPATH)
You will first have to install the libraries your code depends on. The
go tool can be used from the command line like this:
$ go get github.com/golang/freetype
Now you can run your code:
$ go run main.go
Looks fine to me.
Do you still have a problem?
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.