From 503c4f339f4fd6bf0c102f3688bb736722d11320 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Mon, 27 Mar 2023 01:57:49 +0200 Subject: [PATCH] Remove pointer methods --- util/crypto/mnemonic.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/crypto/mnemonic.go b/util/crypto/mnemonic.go index 4f184bfb..9f55f6b8 100644 --- a/util/crypto/mnemonic.go +++ b/util/crypto/mnemonic.go @@ -22,7 +22,7 @@ func NewMnemonicGenerator() MnemonicGenerator { type Mnemonic string -func (g *MnemonicGenerator) WithWordCount(wc int) (Mnemonic, error) { +func (g MnemonicGenerator) WithWordCount(wc int) (Mnemonic, error) { size := 0 switch wc { case 12: @@ -41,7 +41,7 @@ func (g *MnemonicGenerator) WithWordCount(wc int) (Mnemonic, error) { return g.WithWordCount(size) } -func (g *MnemonicGenerator) WithRandomEntropy(size int) (Mnemonic, error) { +func (g MnemonicGenerator) WithRandomEntropy(size int) (Mnemonic, error) { entropy, err := bip39.NewEntropy(size) if err != nil { return "", err @@ -53,7 +53,7 @@ func (g *MnemonicGenerator) WithRandomEntropy(size int) (Mnemonic, error) { return Mnemonic(mnemonic), nil } -func (g *MnemonicGenerator) WithEntropy(b []byte) (Mnemonic, error) { +func (g MnemonicGenerator) WithEntropy(b []byte) (Mnemonic, error) { mnemonic, err := bip39.NewMnemonic(b) if err != nil { return "", err