我想从 Seed 方法调用两个方法(seedAccounts 和 initializeBucket)。有没有办法做到这一点?它一直说“未解决的参考”。
这是代码
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
}