package qiniu import ( "github.com/qiniu/api.v7/v7/auth" "github.com/qiniu/api.v7/v7/storage" ) func BucketDelete(bucketName string) error { mac := auth.New(AK, SK) cfg := storage.Config{ // 是否使用https域名进行资源管理 UseHTTPS: false, } bucketManager := storage.NewBucketManager(mac, &cfg) return bucketManager.DropBucket(bucketName) }