go-urlsh/internal/db/interactions.go

14 lines
265 B
Go

package db
import (
"context"
"github.com/uptrace/bun"
)
func InsertIntoDB(db *bun.DB, thing any) error {
_, err := db.NewInsert().Model(&thing).Exec(context.Background())
if err != nil {
t.Fatalf("Couldn't insert test mfa config into DB: %q\n", err)
}
}