Reputation: 1249
I want to call two methods(seedAccounts and initializeBucket) from the Seed method. Is there a way to do it? It keeps saying "Unresolved reference".
Here is the code
type BoltClient struct {
boltDB *bolt.DB
}
func (bc *BoltClient) Seed() {
initializeBucket() //unresolved reference initializeBucket
seedAccounts() // unresolved reference seedAccounts
}
func (bc *BoltClient) initializeBucket() {
//Code
}
func (bc *BoltClient) seedAccounts() {
//Code
}
Upvotes: 0
Views: 4969
Reputation: 754
initializeBucket()
and seedAccounts()
are methods of type BoltClient
, quick fix:
func (bc *BoltClient) Seed() {
bc.initializeBucket()
bc.seedAccounts()
}
Upvotes: 5