package main import ( "fmt" "github.com/boltdb/bolt" ) func main() { db, err := bolt.Open("myDB.db", 0600, nil) if err != nil { panic(err) } defer db.Close() err = db.Update(func(tx *bolt.Tx) error { bucket, err := tx.CreateBucketIfNotExists([]byte("myBucket")) if err != nil { panic(err) } err = bucket.Put([]byte("myKey"), []byte("myValue")) if err != nil { panic(err) } return nil }) if err != nil { panic(err) } fmt.Println("Key/Value pair added to bucket successfully.") }This code opens up a BoltDB database file named "myDB.db", creates a bucket named "myBucket", and adds a key/value pair called "myKey"/"myValue" into the bucket. If the specified key already exists in the bucket, the value will be updated.