Go Code-Generator

Open-source Go projects categorized as Code-Generator

Top 23 Go Code-Generator Projects

  • sqlc

    Generate type-safe code from SQL

  • Project mention: Give Up Sooner | dev.to | 2024-03-13

    "Is there a way to get sqlc to use pointers for nullable columns instead of the sql.Null types?"

  • GoSwagger

    Swagger 2.0 implementation for go

  • Project mention: How do you provide documentation for your REST APIs? | /r/golang | 2023-11-24
  • 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.

    InfluxDB logo
  • gotests

    Automatically generate Go test boilerplate from your source code.

  • Project mention: Russ Cox: Go Testing by Example | news.ycombinator.com | 2023-12-05

    A huge time-saver for me when generating table-driven test boilerplate in Go has been using gotests[0] to generate the template.

    If you use VSCode with the Go extension it's already available there as a command "Go: Generate Unit Tests for Function/Package".

    [0] https://github.com/cweill/gotests

  • 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: Open-sourcing SQX, a way to build flexible database models in Go | news.ycombinator.com | 2023-09-02

    i like xo's approach https://github.com/xo/xo but it is as is. I would love if something similar comes along that is used by db practititoners that is actively used and supported.

  • jennifer

    Jennifer is a code generator for Go

  • Project mention: How to minimize RAM usage during Go binary compilation | /r/golang | 2023-07-11

    We have a repo/library called fasten-sources which is made up of mostly generated code (using dave/jennifer)

  • jet

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

  • Project mention: Open-sourcing SQX, a way to build flexible database models in Go | news.ycombinator.com | 2023-09-02

    We are really happy using jet. It lets you write type safe SQL and can read the results into structs- including joins into slice fields.

    https://github.com/go-jet/jet

  • ogen

    OpenAPI v3 code generator for go

  • Project mention: I write HTTP services in Go after 13 years (Mat Ryer, 2024) | news.ycombinator.com | 2024-02-09

    https://github.com/ogen-go/ogen

    Write openapi definition, it'll do routing, definition of structs, validation of JSON schemas, etc.

    All I need to do is implement the service.

    Validating an integer range for a querystring parameter is just too boring. And too easy to mistype when writing it manually.

    Anyways, so far only been playing, so haven't found the bad parts yet.

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

    WorkOS logo
  • hof

    Framework that joins data models, schemas, code generation, and a task engine. Language and technology agnostic.

  • Project mention: Ask HN: Are SQL developers generally familiar with JSON, VSCode and Docker? | news.ycombinator.com | 2024-03-14

    Many business analysts use SQL, have for a long time. They are probably not your target audience. With the problem being JAVA specific, you'd likely want to start there

    This sounds similar to the goals of my hof tool (https://github.com/hofstadter-io/hof), lift type definitions out of code so they can be defined in one place, then generate the code for all the places. Is that sounding like what you are after?

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

  • xgen

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

  • kyaml2go

    K8s Go client code generator from Kubernetes resource yamls

  • openapi-cli-generator

    Generate a CLI from an OpenAPI 3 specification

  • toolkit

    Collection of useful patterns (by donutloop)

  • deep-copy

    Deep copy generator

  • openapi-generator-go

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

  • easygen

    Easy to use universal code/text generator

  • convergen

    A type-to-type copy function code generator.

  • hofmod-cli

    Hofstadter generator for Golang CLIs

  • mjson2go

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

  • newc

    A code generator that generates constructor code for Golang structures.

  • gogenswagger

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

  • middlewarer

    Generate a middleware framework for any Go interface

  • Project mention: middlewarer - Generate a middleware framework for any Go interface | /r/golang | 2023-06-30

    To solve this, I created middlewarer. It's a Go generator that generates a middleware framework for any Go interface.With middlewarer, I was able to define logging and prometheus middleware generically for all the relevant structs.I made sure that users must not define middleware for every single interface method, which makes the resulting code a lot slimmer and easier to read.

  • 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

    SaaSHub logo
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).

Go Code-Generator related posts

Index

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

Project Stars
1 sqlc 10,950
2 GoSwagger 9,271
3 gotests 4,849
4 xo 3,563
5 jennifer 3,177
6 jet 2,025
7 ogen 1,072
8 hof 475
9 copygen 331
10 xgen 291
11 kyaml2go 286
12 openapi-cli-generator 168
13 toolkit 158
14 deep-copy 148
15 openapi-generator-go 94
16 easygen 62
17 convergen 27
18 hofmod-cli 25
19 mjson2go 22
20 newc 19
21 gogenswagger 5
22 middlewarer 3
23 goat 0

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com