Code Generation

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • xo

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

  • sqlgen

    Discontinued Go tool for generating sql scanners, sql statements and other helper functions

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

    Generate type-safe code from SQL

  • JSON-to-Go

    Translates JSON into a Go type in your browser instantly (original)

  • Marshaling responses from web services. If we are optimizing for readability, we should have strongly typed structs to marshal in to. This leads to grunt work in defining the type struct that maps to the web service. The code generation solution is using a tool like https://mholt.github.io/json-to-go/ .

  • GoSwagger

    Swagger 2.0 implementation for go

  • https://goswagger.io/ (makes swagger compatible API's from definitions or code)

  • goa

    🌟 Goa: Elevate Go API development! 🚀 Streamlined design, automatic code generation, and seamless HTTP/gRPC support. ✨

  • https://goa.design/ (makes a 'hexagonal' architecture micro-service)

  • wire

    Compile-time Dependency Injection for Go

  • Also wrote some static dependency code generation tools which create a custom service that has the necessary dependencies loaded already similar to google/wire but much fewer features.

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

    WSDL2Go code generation as well as its SOAP proxy

  • There is this https://github.com/hooklift/gowsdl

  • ent

    An entity framework for Go

  • Ent also uses code-generation for generating database-access clients.

  • Encore

    Encore is the Backend Development Platform purpose-built to help you create event-driven and distributed systems.

  • Feedback appreciated: https://github.com/encoredev/encore

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts