The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more β
Top 23 Go Code Generation Projects
-
goa
π Goa: Elevate Go API development! π Streamlined design, automatic code generation, and seamless HTTP/gRPC support. β¨
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
keploy
Test generation for Developers. Generate tests and stubs for your application that actually work!
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
gnostic
A compiler for APIs described by the OpenAPI Specification with plugins for code generation and other API support tasks.
-
truss
Truss helps you build go-kit microservices without having to worry about writing or maintaining boilerplate code.
-
webrpc
webrpc is a schema-driven approach to writing backend services for modern Web apps and networks
-
copygen
Go generator to copy values from type to type and fields from struct to struct (copier without reflection). Generate any code based on types.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
My experience of Golang is that dependency injection doesn't really have much benefit. It felt like a square peg in a round hole exercise when my team considered it. The team was almost exclusively Java/Typescript Devs so it was something that we thought we needed but I don't believe we actually missed once we decided to not pursue it.
If you are looking at OpenAPI in Golang I can recommend having a look at https://goa.design/. It's a DSL that generates OpenAPI specs and provides an implementation of the endpoints described. Can also generate gRPC from the same definitions.
We found this removed the need to write almost all of the API layer and a lot of the associated validation. We found the generated code including the server element to be production ready from the get go.
October is the month of Open Source and Keploy is taking part in this celebration. You can contribute to several Keploy projects by participating in this yearβs Hacktoberfest. You can both contribute to the code part and the no-code part as well. Here are some contributions that you can make!
We have a repo/library called fasten-sources which is made up of mostly generated code (using dave/jennifer)
I wonder whether avo could have been useful here?[1] I mention it because it came up the last time we were talking about AVX operations in go.[2]
1 = https://github.com/mmcloughlin/avo
2 = https://news.ycombinator.com/item?id=34465297
Project mention: Bebop v3: a fast, modern replacement to Protocol Buffers | news.ycombinator.com | 2024-03-12
For json schema specifically there are some tools like go-jsonschema[1] but I've never used them personally. But you can use something like ffjson[2] in go to generate a static serialize/deserialize function based on a struct definition.
[1] https://github.com/omissis/go-jsonschema
Swaggest OpenAPI structures for Go
Go Code Generation related posts
- Microservices communication
- How to minimize RAM usage during Go binary compilation
- Lazy Let: A Cheap Way and Easy Way to Add Lazyness
- Go server + TypeScript client with end-to-end type safety?
- Does anyone know a pattern/library for creating editable generated files?
- Simple code generator tools to explore inner workings of?
- How Disgo Used Copygen to Generate 10,000 Lines Of Code
-
A note from our sponsor - WorkOS
workos.com | 27 Apr 2024
Index
What are some of the best open-source Code Generation projects in Go? This list will help you:
Project | Stars | |
---|---|---|
1 | go-zero | 27,600 |
2 | goa | 5,461 |
3 | easyjson | 4,348 |
4 | go-recipes | 3,807 |
5 | keploy | 3,316 |
6 | jennifer | 3,177 |
7 | avo | 2,590 |
8 | gnostic | 1,985 |
9 | gen | 1,432 |
10 | GoWrap | 886 |
11 | truss | 733 |
12 | zek | 728 |
13 | webrpc | 673 |
14 | go-jsonschema | 499 |
15 | goverter | 439 |
16 | enumer | 369 |
17 | copygen | 331 |
18 | apibrew | 219 |
19 | charlatan | 200 |
20 | openapi-go | 193 |
21 | toolkit | 158 |
22 | gofire | 109 |
23 | dingo | 94 |
Sponsored