pelican/internal/board/card.go
Dan Anglin dbb37a1060
refactor: a lil bit of refactoring
Changes:

- Rename the UI type to App.
- Rename NewUI() to NewApp().
- Move init functions to internal/ui/ui.go.
- Call app's initialisation function from main.
- Move the keymapping functionalities to internal/ui/keymappings.go.
- Add documentation for updateColumn() and updateAllColumns().
- Applied gofmt.

Also:

- Build(mage): optionally include -a and/or -v during go build.
2024-01-14 13:46:42 +00:00

29 lines
511 B
Go

package board
import "fmt"
type CardNotExistError struct {
ID int
}
func (e CardNotExistError) Error() string {
return fmt.Sprintf("card ID '%d' does not exist in the database", e.ID)
}
// Card represents a card on a Kanban board.
type Card struct {
ID int
Title string
Description string
Created string
}
// UpdateId updates the ID of the Card value.
func (c *Card) UpdateId(id int) {
c.ID = id
}
// Id returns the ID of the Card value.
func (c *Card) Id() int {
return c.ID
}