0
我想從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
}