recipes
cobra
recipes | cobra | |
---|---|---|
17 | 129 | |
2,868 | 36,077 | |
1.2% | - | |
9.7 | 7.8 | |
8 days ago | 3 days ago | |
Go | Go | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
recipes
- Fiber – Express inspired web framework written in Go
-
go-mir - a toolkit to develop RESTful API backend service like develop service of gRPC
Mir is a toolkit to develop RESTful API backend service like develop service of gRPC. It adapt some HTTP framework sush as Gin, Chi, Hertz, Echo, Iris, Fiber, Macaron, Mux, httprouter。
-
Tools besides Go for a newbie
IDE: use whatever make you productive. I personally use vscode. VCS: git, as golang communities use github heavily as base for many libraries. AFAIK Linter: use staticcheck for linting as it looks like mostly used linting tool in go, supported by many also. In Vscode it will be recommended once you install go plugin. Libraries/Framework: actually the standard libraries already included many things you need, decent enough for your day-to-day development cycles(e.g. `net/http`). But here are things for extra: - Struct fields validator: validator - Http server lib: chi router , httprouter , fasthttp (for non standard http implementations, but fast) - Web Framework: echo , gin , fiber , beego , etc - Http client lib: most already covered by stdlib(net/http), so you rarely need extra lib for this, but if you really need some are: resty - CLI: cobra - Config: godotenv , viper - DB Drivers: sqlx , postgre , sqlite , mysql - nosql: redis , mongodb , elasticsearch - ORM: gorm , entgo , sqlc(codegen) - JS Transpiler: gopherjs - GUI: fyne - grpc: grpc - logging: zerolog - test: testify , gomock , dockertest - and many others you can find here
-
I know JavaScript and looking for Go learning resource
With lovely recipes: https://github.com/gofiber/recipes
-
The best Go framework: no framework? (Three Dots Tech)
If I started working at a Go shop that used a framework, I would hope it would be Fiber. Not for any particular solid reasons, though. Rather just personal preference based on how the developer experience feels to me personally.
- Criando uma API Rest com Fiber - Uma história pessoal de aprendizado
- Construindo uma API organizadinha em Golang usando Fiber
- Lightweight opensource Go-based spa-to-http tool "beats" Nginx in SPA serving performance
-
Ask HN: What GO web framework do you use?
I use Fiber [0] in production for a $4M ARR company and never had any issues.
Took less than a month to start with and integrate and it is a joy to use.
[0] https://github.com/gofiber/fiber
-
Framework or advices for API
Fiber is quite light weight and performant, its beginner friendly as well. The complexity of your app has to live somewhere. You are going to need a router at least, any framework that is lightweight and has sensible defaults is always worth considering over doing everything on your own. There are plenty of useful examples
cobra
-
The power of the CLI with Golang and Cobra CLI
We can use the flag with --date or -date, Go already does the automatic check. We can make our entire boilerplate with this approach, but let's make it a little easier and use the Cobra CLI package.
-
Build your own curl in Golang
In this tutorial, we'll walk through the process of creating a simple command-line tool similar to curl using Go and Cobra, a CLI library for Go.
-
Scripts should be written using the project main language
I use https://github.com/spf13/cobra religiously for this kind of thing - it handles all the annoying corner cases of parsing flags, and also has an intuitive notion of subcommands (with basic usage/help text generated) for picking which task you want to run with positional arguments.
-
Command Line Interface Guidelines
We recently chose cobra[1] to create a cli application. It comes with so many best practices already packaged like autocompletions, help texts etc. etc.
[1]: https://github.com/spf13/cobra
-
What 3rd-party libraries do you use often/all the time?
github.com/spf13/cobra
- O poder do CLI com Golang e Cobra CLI
-
How to read Cobra command line flag
I looked at the docs: https://cobra.dev/ ... and there are only examples on how to add new flags.
-
Dockerizing Golang CLI Tool - A Step-by-Step Guide
For installing Cobra-CLI you can go to Cobraor run go install github.com/spf13/cobra-cli@latest in the terminal.
-
Packaging Go for Arch Linux Tutorial
In my build phase, I compile the source to create a k3sup binary and I also run the binary to generate shell script completions. Give kudos to this functionality which comes from spf13/cobra Go library for CLIs.
-
Add License Headers to Your Code Files
NWA is a command-line tool built on cobra. Here's an overview of NWA's commands:
What are some alternatives?
go-clean-arch - Go (Golang) Clean Architecture based on Reading Uncle Bob's Clean Architecture
urfave/cli - A simple, fast, and fun package for building command line apps in Go
fiber-go-template - 📝 Production-ready backend template with Fiber Go Web Framework for Create Go App CLI.
cli - CLI - A package for building command line app with go
oapi-codegen - Generate Go client and server boilerplate from OpenAPI 3 specifications
kingpin - CONTRIBUTIONS ONLY: A Go (golang) command line and flag parser
imgui-go-examples - Examples of Dear ImGui for Go
kong - Kong is a command-line parser for Go
fiber-versioning-boilerplate - A boilerplate for fiber versioning, Clean Architecture, API versioning, API documentation, Data versioning
go-flags - go command line option parser
tutorial-go-fiber-rest-api - 📖 Build a RESTful API on Go: Fiber, PostgreSQL, JWT and Swagger docs in isolated Docker containers.
mitchellh/cli - A Go library for implementing command-line interfaces.