Go Struct

Open-source Go projects categorized as Struct

Top 21 Go Struct Projects

  1. kong

    Kong is a command-line parser for Go (by alecthomas)

    Project mention: argp: GNU-style command line argument parser for Go | news.ycombinator.com | 2025-03-23

    Cobra is certainly popular, but it has many weird edge cases and limitations. It's been a while since I've used it so I can't recall the specifics, but I do remember it being a very poor experience, both as a developer and as a user of an app that uses it.

    I've had a much better experience using https://github.com/alecthomas/kong , and I've heard good things about https://github.com/urfave/cli , so I would recommend those over Cobra.

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. defaults

    Initialize structs with default values (by creasty)

  4. goverter

    Generate type-safe Go converters by defining function signatures.

  5. protoc-gen-gotag

    Add custom struct tags to protobuf generated structs

  6. go-jsonstruct

    Generate Go structs from multiple JSON or YAML objects.

    Project mention: Show HN: Generate Go structs from multiple JSON objects | news.ycombinator.com | 2024-09-12
  7. goq

    A declarative struct-tag-based HTML unmarshaling or scraping package for Go built on top of the goquery library

  8. typex

    [TOOL/CLI] - Filter and examine Go type structures, interfaces and their transitive dependencies and relationships. Export structural types as TypeScript value object or bare type representations.

  9. SaaSHub

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

    SaaSHub logo
  10. gody

    :balloon: A lightweight struct validator for Go

  11. binstruct

    Golang binary decoder for mapping data into the structure

  12. faker

    Random fake data and struct generator for Go. (by pioz)

  13. go-xmlstruct

    Generate Go structs from multiple XML documents.

  14. flat

    Flatten/unflatten nested map or JSON object in Golang (by nqd)

  15. go-httpheader

    A Go library for encoding structs into Header fields.

  16. straf

    Convert Golang Struct To GraphQL Object On The Fly

  17. newc

    A code generator that generates constructor code for Golang structures.

  18. go-traits

    A concept package that helps implement mixin behavior using embedded structs and hook interfaces.

  19. anyflag

    Generic implementation of Cobra Value and SliceValue types

  20. gen

    gen is a generic general use Go functions library with the intention of replacing duplicated code where the same functionality is needed across multiple types, and provides a common interface for the functionality. The library is designed to be used in a wide variety of projects and is designed to be easy to use. (by devnw)

  21. gonfig

    Tag based configuration loader from different providers

  22. gobetter

    GO Better - code generator for struct required fields

  23. textra

    A package designed to extract and work with go structs as values. Types & Tags export (by ravsii)

  24. 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 Struct discussion

Log in or Post with

Go Struct related posts

  • Show HN: Generate Go structs from multiple JSON objects

    1 project | news.ycombinator.com | 12 Sep 2024
  • Go-xmlstruct: generate Go structs from example XML documents

    1 project | news.ycombinator.com | 8 Jan 2023
  • I made a mind map of the whole go standard library

    1 project | /r/golang | 3 Dec 2022
  • make-constructor: a cli-tool to generate constructor code for a struct. It doesn't need manual installation, just add a comment line to the struct then it works.

    1 project | /r/golang | 5 Aug 2022
  • Filter and examine Go type structures, interfaces and their transitive dependencies and relationships. Export structural types as TypeScript value object or bare type representations.

    1 project | /r/golang | 18 Jun 2022
  • Visualizing struct embedding in Go

    2 projects | /r/golang | 1 Nov 2021
  • Inconsistent typing in JSON feed

    1 project | /r/golang | 25 May 2021
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 15 May 2025
    InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now. Learn more →

Index

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

# Project Stars
1 kong 2,615
2 defaults 829
3 goverter 677
4 protoc-gen-gotag 394
5 go-jsonstruct 336
6 goq 265
7 typex 205
8 gody 130
9 binstruct 106
10 faker 99
11 go-xmlstruct 84
12 flat 69
13 go-httpheader 47
14 straf 41
15 newc 35
16 go-traits 22
17 anyflag 16
18 gen 13
19 gonfig 9
20 gobetter 9
21 textra 7

Sponsored
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com

Did you know that Go is
the 4th most popular programming language
based on number of references?