Go Code-Generator

Open-source Go projects categorized as Code-Generator

Top 20 Go Code-Generator Projects

  • GoSwagger

    Swagger 2.0 implementation for go

    Project mention: Go-Swagger not generating properties in yaml file | reddit.com/r/golang | 2023-01-28

    Can anyone point out what am I doint wrong? Note: I have already checked No properties generated in json file for swagger:response but didn't find anything which can help.

  • sqlc

    Generate type-safe code from SQL

    Project mention: You might not need an ORM | news.ycombinator.com | 2023-01-25
  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • gotests

    Automatically generate Go test boilerplate from your source code.

    Project mention: Table-driven tests are overrated. | reddit.com/r/golang | 2023-01-17

    I believe vscode does it using gotests (https://github.com/cweill/gotests), so people can probably use it outside of vscode too.

  • xo

    Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server (by xo)

    Project mention: Help with XO's new templating, how to access fields and params | reddit.com/r/golang | 2022-08-23

    I am using the library xo to generate basic data retrieval code from a sql schema for a crud api.

  • jennifer

    Jennifer is a code generator for Go

    Project mention: Designing a config API for microservices applications built using Go | dev.to | 2022-11-10

    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.

  • jet

    Type safe SQL builder with code generation and automatic query result data mapping

    Project mention: How to Work with SQL Databases in Go | reddit.com/r/golang | 2023-01-19
  • colfer

    binary serialization format

  • InfluxDB

    Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Platform where developers build real-time applications for analytics, IoT and cloud-native services. Easy to start, it is available in the cloud or on-premises.

  • ogen

    OpenAPI v3 code generator for go

    Project mention: Go stack for REST APIs? | reddit.com/r/golang | 2022-11-20

    https://github.com/ogen-go/ogen/ is my potential replacement, need to evaluate it fully though.

  • hof

    The High Code Framework (low-code for devs), a modular code generation system powered by CUE

    Project mention: Ask HN: Smallest cross-platform language runtime? | news.ycombinator.com | 2023-02-03

    I'm building a tool on top of CUE and Go's text/template library. My opinion is that the problem is more how Hugo organizes and combines files, lots of magic if you don't know how it makes decisions, kinda like CSS rules being opaque.


  • kyaml2go

    K8s Go client code generator from Kubernetes resource yamls

  • 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.

    Project mention: sqlc patterns in production | reddit.com/r/golang | 2022-08-16

    An alternative is to use a reflection based struct copier library or a codegen struct copier library

  • xgen

    XSD (XML Schema Definition) parser and Go/C/Java/Rust/TypeScript code generator

    Project mention: Help to improve error details on parsing xml using serde-xml-rs | reddit.com/r/rust | 2022-03-04

    I'am trying to parse a xml file using serde-xml-rs with generated structs by xgen.

  • toolkit

    Collection of useful patterns (by donutloop)

  • deep-copy

    Deep copy generator

  • easygen

    Easy to use universal code/text generator

  • openapi-generator-go

    An opinionated OpenAPI v3 code generator for Go. Use this to generate API models and router scaffolding.

  • hofmod-cli

    Hofstadter generator for Golang CLIs

  • mjson2go

    A tool to convert a MongoDB pipeline into parameterized Go code.

  • gogenswagger

    gogenswagger will generate signatures for the test case using swagger json file

    Project mention: Generating API tests signatures using swagger | reddit.com/r/golang | 2022-10-20

    gogenswagger: https://github.com/Mussabaheen/gogenswagger

  • goat

    Easily generate golang source from templates. (by fluhus)

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-02-03.

Go Code-Generator related posts


What are some of the best open-source Code-Generator projects in Go? This list will help you:

Project Stars
1 GoSwagger 8,323
2 sqlc 7,329
3 gotests 4,425
4 xo 3,309
5 jennifer 2,723
6 jet 1,029
7 colfer 684
8 ogen 433
9 hof 353
10 kyaml2go 282
11 copygen 231
12 xgen 215
13 toolkit 154
14 deep-copy 120
15 easygen 55
16 openapi-generator-go 48
17 hofmod-cli 23
18 mjson2go 15
19 gogenswagger 5
20 goat 0
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives