Golang has testing tools built into the standard go tool and the standard library. Here is how to write a unit test on a function so that you can run it with go test.
go test