package main import ( "fmt" "github.com/algorand/go-algorand-sdk/crypto" "github.com/algorand/go-algorand-sdk/mnemonic" "os" "regexp" "runtime" ) func main() { walletChan := make(chan string) pattern := os.Args[1] for i := 0; i < runtime.NumCPU(); i++ { go func() { for { account := crypto.GenerateAccount() go func(acc crypto.Account) { m, _ := mnemonic.FromPrivateKey(acc.PrivateKey) wallet := fmt.Sprintf("%s:%s\n", acc.Address, m) matched, _ := regexp.MatchString(pattern, wallet) if matched { walletChan <- wallet } }(account) } }() } fmt.Println(<-walletChan) os.Exit(0) }