diff --git a/internal/board/card.go b/internal/board/card.go index ab47112..944ddf8 100644 --- a/internal/board/card.go +++ b/internal/board/card.go @@ -12,10 +12,10 @@ func (e CardNotExistError) Error() string { // Card represents a card on a Kanban board. type Card struct { - ID int - Title string + ID int + Title string Description string - Created string + Created string } // UpdateId updates the ID of the Card value. diff --git a/internal/board/card_lifecycle_test.go b/internal/board/card_lifecycle_test.go index f8dedaa..71e6eed 100644 --- a/internal/board/card_lifecycle_test.go +++ b/internal/board/card_lifecycle_test.go @@ -58,7 +58,7 @@ func testCreateCard(kanban board.Board, title, content string, expectedCardID, e t.Log("When the card is created and saved to the database.") args := board.CardArgs{ - NewTitle: title, + NewTitle: title, NewDescription: content, } @@ -123,7 +123,7 @@ func testUpdateCard(kanban board.Board, cardID int, newTitle, newContent, timest args := board.UpdateCardArgs{ CardID: cardID, CardArgs: board.CardArgs{ - NewTitle: newTitle, + NewTitle: newTitle, NewDescription: newContent, }, } @@ -138,10 +138,10 @@ func testUpdateCard(kanban board.Board, cardID int, newTitle, newContent, timest } want := board.Card{ - ID: cardID, - Title: newTitle, + ID: cardID, + Title: newTitle, Description: newContent, - Created: timestamp, + Created: timestamp, } if !reflect.DeepEqual(got, want) { @@ -159,7 +159,7 @@ func testUpdateCardContent(kanban board.Board, cardID int, expectedTitle, newCon args := board.UpdateCardArgs{ CardID: cardID, CardArgs: board.CardArgs{ - NewTitle: "", + NewTitle: "", NewDescription: newContent, }, } @@ -174,10 +174,10 @@ func testUpdateCardContent(kanban board.Board, cardID int, expectedTitle, newCon } want := board.Card{ - ID: cardID, - Title: expectedTitle, + ID: cardID, + Title: expectedTitle, Description: newContent, - Created: timestamp, + Created: timestamp, } if !reflect.DeepEqual(got, want) { diff --git a/internal/db/database_test.go b/internal/db/database_test.go index 00d49ad..eed5594 100644 --- a/internal/db/database_test.go +++ b/internal/db/database_test.go @@ -163,8 +163,8 @@ func TestReadAndWriteCards(t *testing.T) { }() singleCard := board.Card{ - ID: -1, - Title: "A test task.", + ID: -1, + Title: "A test task.", Description: "This task should be completed.", } @@ -173,18 +173,18 @@ func TestReadAndWriteCards(t *testing.T) { manyCards := []board.Card{ { - ID: -1, - Title: "Test card A.", + ID: -1, + Title: "Test card A.", Description: "This is test card A.", }, { - ID: -1, - Title: "Test card B.", + ID: -1, + Title: "Test card B.", Description: "This is test card B.", }, { - ID: -1, - Title: "Test card C.", + ID: -1, + Title: "Test card C.", Description: "This is test card C.", }, } @@ -223,8 +223,8 @@ func testReadOneCard(t *testing.T, database *bolt.DB, cardID int) { } want := board.Card{ - ID: 1, - Title: "A test task.", + ID: 1, + Title: "A test task.", Description: "This task should be completed.", } @@ -278,18 +278,18 @@ func testReadManyCards(t *testing.T, database *bolt.DB, cardIDs []int) { want := []board.Card{ { - ID: 2, - Title: "Test card A.", + ID: 2, + Title: "Test card A.", Description: "This is test card A.", }, { - ID: 3, - Title: "Test card B.", + ID: 3, + Title: "Test card B.", Description: "This is test card B.", }, { - ID: 4, - Title: "Test card C.", + ID: 4, + Title: "Test card C.", Description: "This is test card C.", }, } @@ -326,8 +326,8 @@ func TestDeleteOneCard(t *testing.T) { // Create one card, get card ID. card := board.Card{ - ID: -1, - Title: "Test card", + ID: -1, + Title: "Test card", Description: "", } diff --git a/magefiles/mage.go b/magefiles/mage.go index e511ee7..b0f50bf 100644 --- a/magefiles/mage.go +++ b/magefiles/mage.go @@ -54,7 +54,7 @@ func Build() error { build := sh.RunCmd("go", "build") - args:= []string{"-ldflags="+flags, "-o", binary} + args := []string{"-ldflags=" + flags, "-o", binary} if os.Getenv("PELICAN_BUILD_REBUILD_ALL") == "1" { args = append(args, "-a")