goat-systems / go-tezos

Go Tezos Is a Go library that exposes and builds upon the Tezos RPC.
MIT License
71 stars 45 forks source link

De-internalize crypto module #164

Open utdrmac opened 3 years ago

utdrmac commented 3 years ago

Many of the crypto functions, like b58cdecode, can be utilized by other go-based applications doing Tezos stuff. By putting these functions in their own /crypto module, and marking all functions as exportable, go-tezos can continue using them, plus other applications too vs re-inventing/copying code.

utdrmac commented 3 years ago
$ go build
package mytesting
    nonce.go:7:2: use of internal package github.com/goat-systems/go-tezos/v3/internal/crypto not allowed

According to godocs:

An import of a path containing the element “internal” is disallowed if the importing code is outside the tree rooted at the parent of the “internal” directory.

Please consider moving the crypto code into a differently named directory so that it can be used by other projects.

DefinitelyNotAGoat commented 3 years ago

I can do this. I will review the package before making it public.