In this fun and easy video, learn how to build an interactive CLI app with Go, Cobra and promptui. See how we can prompt users for input and save the input to an SQLite database.
If you find this video to be helpful, please consider liking it. Also subscribe if you'd like to see more of this type of content.
📎 Text tutorial and repo link
- Text tutorial - divrhino.com/a...
- Code repo - github.com/div...
🦏 Related videos
- Create a dad joke CLI app - • Golang Cobra CLI tool ...
- Add flags to a CLI app - • Golang CLI flags with ...
⌛ Timestamps
00:00 - Introduction
00:33 - Prerequisites
00:40 - Set up project directory
01:30 - Update root command
01:54 - Set up database
03:45 - Create database table
05:35 - Creating note command
06:35 - Create note new subcommand
11:20 - Insert notes into database
13:36 - Create note list subcommand
⭐ Go Packages
1. Cobra - github.com/spf...
2. promptui - github.com/man...
3. go-sqlite3 - github.com/mat...
🔗 Useful Links
- Downloading Go - golang.org/dl/
- Cobra generator - githhub.com/sp...
💜 Div Rhino Links
Github - github.com/div...
Website - divrhino.com
dev.to - dev.to/divrhino
hackernoon - hackernoon.com...
14 авг 2024