Skip to content

Commit

Permalink
beta440
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoshinonyaruko committed Jun 27, 2024
1 parent 2d425d7 commit a4aae4a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions idmap/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,8 @@ func InitializeDB() {
}

func ClearBucket(bucketName string) {
// 打开数据库文件
db, err := bbolt.Open(DBName, 0600, nil)
if err != nil {
log.Fatalf("Error opening DB: %v", err)
}
defer db.Close()

// 清空指定的bucket
err = db.Update(func(tx *bbolt.Tx) error {
err := db.Update(func(tx *bbolt.Tx) error {
// 获取指定的bucket
bucket := tx.Bucket([]byte(bucketName))
if bucket == nil {
Expand Down

0 comments on commit a4aae4a

Please sign in to comment.