feat: move a card between statuses #3
4 changed files with 7 additions and 6 deletions
2
db.go
2
db.go
|
@ -205,7 +205,7 @@ func loadCard(db *bolt.DB, id int) (Card, error) {
|
||||||
var card Card
|
var card Card
|
||||||
bucket := []byte(cardBucket)
|
bucket := []byte(cardBucket)
|
||||||
|
|
||||||
err := db.View(func(tx *bolt.Tx)error {
|
err := db.View(func(tx *bolt.Tx) error {
|
||||||
b := tx.Bucket(bucket)
|
b := tx.Bucket(bucket)
|
||||||
|
|
||||||
if b == nil {
|
if b == nil {
|
||||||
|
|
|
@ -64,7 +64,7 @@ func TestDbDefaultPath(t *testing.T) {
|
||||||
|
|
||||||
if got != want {
|
if got != want {
|
||||||
t.Errorf("Got unexpected database path: want %s, got %s", want, got)
|
t.Errorf("Got unexpected database path: want %s, got %s", want, got)
|
||||||
} else {
|
} else {
|
||||||
t.Logf("Got expected database path: got %s", got)
|
t.Logf("Got expected database path: got %s", got)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ type Status struct {
|
||||||
|
|
||||||
// Card represents a card on a Kanban board
|
// Card represents a card on a Kanban board
|
||||||
type Card struct {
|
type Card struct {
|
||||||
Id int
|
Id int
|
||||||
Title string
|
Title string
|
||||||
Content string
|
Content string
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//+build mage
|
//go:build mage
|
||||||
|
// +build mage
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue