tyler-smith / go-bip39

The BIP39 library for Go.
MIT License
556 stars 196 forks source link

🐜[Bug Report] Error when using Gomobile: func `GetWordIndex` returns wrong type #59

Open kcw-grunt opened 12 months ago

kcw-grunt commented 12 months ago

Problem

When preparing the package to call from swift, the gomobile bind command returns an error.

Here are the logs:

myterminal $ go-bip39 % go get golang.org/x/mobile/cmd/gobind                       
go: added golang.org/x/mobile v0.0.0-20231006135142-2b44d11868fe
myterminal $ go-bip39 % gomobile bind -target ios -o ../frameworks/bip39.xcframework
gomobile: /Users/myterminal/go-workspace/bin/gobind -lang=go,objc -outdir=/var/folders/hp/rh26j25gz_7vm0000gp/T/gomobile-work-825612255/ios -tags=ios github.com/tyler-smith/go-bip39 failed: exit status 1
functions and methods must return either zero or one values, and optionally an error
second result value must be of type error: func github.com/tyler-smith/go-bip39.GetWordIndex(word string) (int, bool)
second result value must be of type error: func github.com/tyler-smith/go-bip39.GetWordIndex(word string) (int, bool)
second result value must be of type error: func github.com/tyler-smith/go-bip39.GetWordIndex(word string) (int, bool)

Not sure how to modify the issue @tyler-smith to create a workaround.

Is there a workaround? Some of the logs suggested that the crypto library had a corrupted go.sum.