jennifer
Jennifer is a code generator for Go (by dave)
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. (by switchupcb)
Our great sponsors
jennifer | copygen | |
---|---|---|
6 | 14 | |
3,177 | 331 | |
- | - | |
3.7 | 0.0 | |
8 months ago | about 2 months ago | |
Go | Go | |
MIT License | GNU General Public License v3.0 only |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.
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.
jennifer
Posts with mentions or reviews of jennifer.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-07-11.
-
How to minimize RAM usage during Go binary compilation
We have a repo/library called fasten-sources which is made up of mostly generated code (using dave/jennifer)
-
Golang’s best-kept secret: ‘executable examples’
Check out my https://github.com/dave/rebecca package for a neat way of building readme docs by embedding Go docs and examples. It generates the readme for https://github.com/dave/jennifer (see https://github.com/dave/jennifer/blob/master/README.md.tpl).
-
Designing a config API for microservices applications built using Go
The design of the wrapper functions meant we couldn’t easily unmarshal the CUE value into the wrapper functions. This meant we needed to generate unmarshalled functions for the config types. We use the excellent Jennifer library by Dave (no really; github.com/dave/jennifer) for generating Go files.
-
Simple code generator tools to explore inner workings of?
I've used https://github.com/dave/jennifer in the past, and been very happy with it.
-
How to choose a golang template rending engine for my project?
If specifically for generating Go code, I would suggest you take a look at Jennifer.
-
Boilerplate for experienced devs
I just spent a few hours writing a crapload of boilerplate code generation code with jennifer, if that helps any.
copygen
Posts with mentions or reviews of copygen.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-03-03.
-
The Icculus Microgrant is giving out 250 dollar grants to open source projects, please brag about your project(s) in this thread so I can see them!
Copygen is a type-based code generator for the Go programming language. Copygen allows developers to generate type-to-type copy functions out-of-the-box without reflection (why?), but it can also be used to generate code. As an example, disgo is a performant, secure, and thread-safe Go Discord API Wrapper that uses Copygen with dasgo to achieve feature completion.
-
sqlc patterns in production
An alternative is to use a reflection based struct copier library or a codegen struct copier library
- How Disgo Used Copygen to Generate 10,000 Lines Of Code
-
What is Disgo? An In-Depth Look.
Disgo is the only Go API Wrapper using a maintainable approach to become feature complete. Disgo is the only Go API Wrapper to provide OAuth2 flows. Disgo is the only wrapper to define API definitions (objects, requests, commands) as structs, allowing for usage of the Discord Producer API without requiring knowledge of an additional API Wrapper Consumer API.
- Copygen v0.4 can generate customized code based on types
- Copygen (v0.4) is a code generator that can generate customized code based on types.
-
Contribute to Copygen v0.4 for Reddit Gold
Copygen allows developers to define types, structs, and more in its setup.go file and has no issues copying them to the output; except for comments. The Go AST makes it "very difficult to update the AST and retain correct comment place (from 2017)" and is not likely to change any time soon. As a result, Copygen sometimes generates free-floating comments (i.e multi.go). Copygen's comments are handled in its Parser. Feel free to use any necessary libraries or rewriting of the comment-parsing mechanism to fix this issue.
- copygen: Generate type-to-type and field-to-field struct code without reflection or dependencies.
- Copygen: Type-Based Code Generator
- Copygen is a code generator that can generate ANY function based on types.
What are some alternatives?
When comparing jennifer and copygen you can also consider the following projects:
Anakin - Codegeneration tool for isomorphic server and mobile Go apps with gRPC & Protobuf. Share code between your backend, Android & iOS app! :sun_with_face:
copier - Copier for golang, copy value from struct to struct and more
gen - Type-driven code generation for Go
goverter - Generate type-safe Go converters by simply defining an interface
go-linq - .NET LINQ capabilities in Go
Package for fast copying structs of different types - Package for fast copying structs of different types
efaceconv
go-zero - A cloud-native Go microservices framework with cli tool for productivity.
interfaces - Code generation tools for Go.
convergen - A type-to-type copy function code generator.
copy - Go copy directory recursively