I'm trying to build program found on github.(https://github.com/ginuerzh/gimme-bitcoin-address)
I have been programming in golang for half a year, but I have never encountered a situation where the program lacks the "go.mod" file or the main function.
Build instruction looks like this, but you can't build without go.mod file, so I use go mod init ...
, but it is not my question here.
$ git clone git://github.com/vsergeev/gimme-bitcoin-address.git
$ cd gimme-bitcoin-address
$ go get code.google.com/p/go.crypto/ripemd160
$ go build
go build
isn't building anything ofcourse
Worth to notice is that go get ...
is outdated, and you have to import "golang.org/x/crypto/ripemd160"
Project structure looks like this:
gimme-bitcoin-address/
|-- LICENSE
|-- README
|-- gimme-bitcoin-address.go
|-- gimme-bitcoin-address_test.go
And, as you see there's no main.go file, but as before this is not real problem.
Only one able-to-build file (except the xx_test.go) is gimme-bitcoin-address.go, let's look at the code.
Instead of package main
, there's package btcaddr
, what else the function that is closest to the main function is func _main
To sum this all up - my question is how can I run this program, after cloning repository, or how to fix it? I dont't really know but, maybe this is some old-fashioned syntax, but function _main
is not called anywhere.
It's probably quite newbie question, but I can't handle it. I hope maybe someone would help me.