Try this:
package main
import (
"fmt"
"encoding/hex"
"github.com/piotrnar/gocoin/lib/btc"
)
const PRV_KEY_HEX = "AB9EA551E262A87A13BB90591BE7B545CDF3FD0E1234567890ABCDEF12345678"
const COMPRESSED = false
func main() {
private_key, _ := hex.DecodeString(PRV_KEY_HEX)
fmt.Println(hex.EncodeToString(btc.PublicFromPrivate(private_key, COMPRESSED)))
}
You will just need to fetch gocoin package first (having
go and
git installed):
go get -d github.com/piotrnar/gocoin