func (a *BadgerDatabase) SetTags(repo string, tags []string) error {
	b, err := marshal(tags)
	if err != nil {
		return err
	}
	return a.db.Update(func(txn *badger.Txn) error {
		e := badger.NewEntry(keyForRepo(tagsPrefix, repo), b)
		return txn.SetEntry(e)
	})
}
SetTags implements the DatabaseWriter interface, recording the tags against
the repo.

It overwrites existing tag sets for the provided repo.
package database
import (
	"encoding/json"
	"fmt"
	"github.com/dgraph-io/badger/v3"
)
const tagsPrefix = "tags"
type BadgerDatabase struct {
	db *badger.DB
}
func NewBadgerDatabase(db *badger.DB) *BadgerDatabase {
	return &BadgerDatabase{
		db: db,
	}
}
func (a *BadgerDatabase) Tags(repo string) ([]string, error) {
	var tags []string
	err := a.db.View(func(txn *badger.Txn) error {
		var err error
		tags, err = getOrEmpty(txn, repo)
		return err
	})
	return tags, err
}