Building Taskwarrior in Golang using Cobra and Charm tools

Описание к видео Building Taskwarrior in Golang using Cobra and Charm tools

https://github.com/charmbracelet/taskcli
THANK YOU TO THE INCREDIBLE MAINTAINERS OF TASKWARRIOR AND COBRA FOR BUILDING COOL STUFF.
Check them out:
https://taskwarrior.org
https://github.com/spf13/cobra

Fun Side Quests (for your enjoyment, duh)
- getTasksByStatus(): make this a filtering option with a flag for viewing your tasks based on their status in list format [12:17]
- Try using the built-in testing TempDir function instead of the os.TempDir solution https://pkg.go.dev/testing#B.TempDir [14:00]
- Write a test case for trying to delete from an empty DB. Is this a useful error message for the user? [15:04]
- Using the strategy for the interactive Kanban board, try making an interactive list as a subcommand for the program. Did it work? Let us know in the comments! [24:48]

Connect with us:
Github: https://github.com/charmbracelet
Discord: https://charm.sh/chat
Matrix: https://charm.sh/matrix
Twitter:   / charmcli  
Mastodon: https://mastodon.social/@charmcli
Instagram:   / charm_cli  

♪ stream cafe - boba date
link:    • "boba date" ♫ | cute background music...  

Chapters:
0:00 What is Task Warrior?
0:16 What we’re building
1:21 The game plan
2:29 How to use this video
2:53 Part 1: Data Storage
3:06 Using XDG-compliant paths: setupPath()
3:51 Setup data directory: initTaskDir()
4:39 Opening our SQLite DB
5:30 CRUD operations: db.go
5:46 Custom list items (for the Kanban board)
6:10 Moving our items around on the board
6:28 Working with our data layer: taskDB
6:51 Creating a new SQL table
7:06 Create: insert() + prepared statements
7:49 Parameterized SQL statements
8:12 Delete
8:18 Update, but actually a side quest
9:00 Tests are the best usage examples
9:13 Update (for real this time)
9:46 Merging changes to our struct
11:55 Read: getTasks()
12:17 I wanna see my completed tasks for an ego boost: getTasksByStatus()
12:54 getTask()
13:17 Part 2: Testing
13:22 TestDelete
14:21: Test setup
16:23 TestGetTask
16:39 TestUpdate
17:11 TestMerge
17:41 TestGetTasksByStatus
17:45 Part 3: Building the CLI with Cobra (cmds.go)
17:56 rootCmd
18:17 addCmd
19:25 deleteCmd
19:52 updateCmd
21:18 Yoinkin styles from bubbles components: listCmd
22:58 Customizing our table styles
23:24 Where to find Go library APIs
23:47 Interactive component as subcommand: kanbanCmd
25:07 Flag setup with cobra
25:27 Adding subcommands to Cobra
25:51 Chatting with bunni

Комментарии

Информация по комментариям в разработке