Тёмный
No video :(

Golang interactive CLI app with Cobra and Promptui | Tutorial 

Div Rhino
Подписаться 3,4 тыс.
Просмотров 16 тыс.
50% 1

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

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 43   
@TheMouseJerry-du1md
@TheMouseJerry-du1md 28 дней назад
Excellent! This is how the teaching should be, i.e Project based learning. Thank you so much!
@DivRhino
@DivRhino 28 дней назад
Thank you so much! I appreciate you being here, your comment is very kind. ✨🙏
@hugolorenzomato7157
@hugolorenzomato7157 2 года назад
Tidy, straightforward and well explained. How difficult it is to find videos that explain so well in such a short time! I'll keep watching your videos. Thank you!
@DivRhino
@DivRhino 2 года назад
You are most kind. Thank you for the wonderful comment and for watching. I hope your day has been going well. 🙂
@rixavv
@rixavv 3 года назад
Your thumbnails are out of this world 😩
@DivRhino
@DivRhino 3 года назад
Aw, thank you for the lovely comment. Hope you're having a good day! :)
@cindrmon
@cindrmon 2 года назад
really great tutorial! i never knew setting up a simple cli program with golang would be this simple! i actually made some revisions to my version of the code, like adding another table for categories and not hardcoding them, and it really helped me get a little familiar with go, cobra, and promptui! looking forward for more of your tutorials~
@DivRhino
@DivRhino 2 года назад
Great job extending the example in the video! And thank you so much for leaving a comment to let me know, it made my day! :)
@cristobaljvp
@cristobaljvp 2 года назад
This was very high quality, good example app too. Thanks a lot!
@DivRhino
@DivRhino 2 года назад
Thank you for your encouraging comment.
@487alber
@487alber 3 года назад
This is an awesome tutorial! Quite clear, direct and well organized. I wish all tutorials were made like this one, congrats and thanks for the work done 😄 Btw, I would like to know more about proper error management with multiple routines or a deep analysis on Golang testing for unitary or integration purposes, I don't know if you have already shown it.
@DivRhino
@DivRhino 3 года назад
Thank you for your kind comment, Alberto! And I have not covered those topics yet, but those are great suggestions for future videos 🙏
@rupeshharode2578
@rupeshharode2578 2 года назад
Great tutorial. I have watched all your videos and I must say they are pretty informative. I have a little request - Can you please create a video on your Golang setup and how you do it? There always seems to be something that doesn't work whenever I want to work on Golang. Thanks!
@DivRhino
@DivRhino 2 года назад
Thank you for watching and for your support, Rupesh. Golang setup is a great idea!
@jabuci
@jabuci Год назад
I love your voice :) It's a pleasure to my ears. And the tutorial is also good, thanks!
@DivRhino
@DivRhino Год назад
Thank you for your kind comment! I'm glad you liked the tutorial!
@paulclarke4099
@paulclarke4099 8 месяцев назад
Th quality of your videos are outstanding 💯😃👍
@DivRhino
@DivRhino 8 месяцев назад
Thank you for your kind comment! Glad to have you here ✨
@colinmsmall
@colinmsmall 3 года назад
Thank you for making these.
@DivRhino
@DivRhino 3 года назад
And thank you for watching and taking the time to leave a nice comment. Hope your week has been a good one! :)
@RodrigoStuchi
@RodrigoStuchi 2 года назад
Really awesome content 👏👏👏, keep it going please
@DivRhino
@DivRhino 2 года назад
I appreciate the encouragement! Thank you so much for watching 🙏
@samuraiprogrammer7568
@samuraiprogrammer7568 2 года назад
Hello. Your tutorials are amazing. Why are you stopping ?
@DivRhino
@DivRhino 2 года назад
Thank you for your comment. I have been going through a pretty busy period at my day job so I’ve had less free time to create videos.
@Akhilshark9
@Akhilshark9 3 года назад
Great Content!
@DivRhino
@DivRhino 3 года назад
Thank you for your kind comment! Hope you are having a good weekend :)
@srttkx
@srttkx 3 года назад
Great video ✌️
@DivRhino
@DivRhino 3 года назад
Thanks, sarath k! I appreciate your continued support. Hoping your week has been going well. :)
@salamander1782
@salamander1782 2 года назад
Super nice video. Quick question: How did you find out about promptui? It doesn't show up in any of the cli ui collections and I couldn't even find it in Github most starred around the same stars as prompt ui. How do you discover useful libraries like this one? Thanks so much!
@DivRhino
@DivRhino 2 года назад
Hello! Thank you for your question. Someone actually mentioned promptui in the comment section of my original CLI tutorial video. That's where I learnt about it :)
@ckayzy1647
@ckayzy1647 Год назад
Is there a way of dockerizing the application but still being able to use cobra commands while containers are running?
@DivRhino
@DivRhino Год назад
Hi there! Thanks for your question. Yes, you can run commands while the container is running. If you're using docker (without docker compose), you need to prepend "docker exec" to your command. Example: "docker exec yourContainerName touch main.go". If you're using docker compose, you can prepend your command with "docker compose run". Example: "docker compose run yourServiceName touch.main.go" Hope this helps!
@chrisbarrott971
@chrisbarrott971 2 года назад
Anyone else get an issue with: exec: "gcc": ececutable file not found in %PATH%? Problem is I'm on a desktop which I cant install stuff easily :/
@DivRhino
@DivRhino 2 года назад
I’m sorry you’re having trouble with the tutorial. The error appears to indicate that you do not have gcc installed on your system. If you’re unable to install things on your current computer, it may be a little difficult to solve this :(
@chrisbarrott971
@chrisbarrott971 2 года назад
@@DivRhino i figured it out in the end 👍 thanks this tutorial was really helpful, it was my fault 😁
@DivRhino
@DivRhino 2 года назад
@@chrisbarrott971 Nice work figuring it out! 🙌
@oussamasethoum2755
@oussamasethoum2755 2 года назад
Are you still doing tutorials ?
@DivRhino
@DivRhino 2 года назад
I am! I just uploaded a new video :)
@oussamasethoum2755
@oussamasethoum2755 2 года назад
@@DivRhino Thank you
@colinmsmall
@colinmsmall 2 года назад
Do you plan on making any more content?
@DivRhino
@DivRhino 2 года назад
Yeah, maybe. Once I get some time off work.
Далее
Parse Rust CLI Args With Clap 🦀 Rust Tutorial
54:03
Qora Gelik
00:26
Просмотров 431 тыс.
«Ой Бой» откуда выражение?
00:45
Are CLI Frameworks Worth it? Trying TYPER
11:23
Просмотров 8 тыс.
Concurrency in Go
18:40
Просмотров 612 тыс.
Amazing Golang configuration with Viper
20:01
Просмотров 9 тыс.
This Makes Golang CLI Development So MUCH Better
7:34
Golang Cobra CLI tool | Tutorial
8:58
Просмотров 36 тыс.
Mastering WebSockets With Go - An in-depth tutorial
2:24:34
Turns out REST APIs weren't the answer (and that's OK!)
10:38
Qora Gelik
00:26
Просмотров 431 тыс.