ThorstenHans / blog-comments

0 stars 0 forks source link

lets-build-a-cli-in-go-with-cobra/ #12

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Let's build a CLI in Go with Cobra · Thorsten Hans' blog

Learn how to build custom CLIs in Go with Cobra. Dive into the - perhaps - most popular Go-module when it comes to build CLIs. Craft your first CLI now.

https://www.thorsten-hans.com/lets-build-a-cli-in-go-with-cobra/

arturtamborski commented 1 year ago

I think something changed since go 1.17, because the init command didn't work for me (go 1.20). Fortunately, dropping the protocol worked fine:

go mod init https://github.com/ThorstenHans/stringer  # bad
go mod init         github.com/ThorstenHans/stringer  # good

no idea what's up here, but the good one worked just fine. Thank you for this tutorial :)

ThorstenHans commented 1 year ago

Thanks @arturtamborski I'll update the post.