felixpalmer / go_images

Example code for generating images in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation

eastwood opened this issue · comments

Would love to compile this bad boy and play around. I tried to use go install and got the following errors:

github.com/b1nd/go_images

.\blur.go:11: main redeclared in this block
previous declaration at .\blank.go:10
.\canvasExample.go:10: main redeclared in this
previous declaration at .\blur.go:11
.\gradient.go:11: main redeclared in this block
previous declaration at .\canvasExample
.\lines.go:11: main redeclared in this block
previous declaration at .\gradient.go:1
.\nodes.go:14: main redeclared in this block
previous declaration at .\lines.go:11
.\spirals.go:13: main redeclared in this block
previous declaration at .\nodes.go:14

I have my GOPATH and workspace configured similar to http://golang.org/doc/code.html

Given that this repository is more to demonstrate code, I've been running the code using go run rather than go build. As such I wind up redeclaring the main function in each example, which is a bit messy.

To run a specific example, run it using go run, making sure you pass in any dependancies, e.g.

go run nodes.go canvas.go vector.go