Go Struct

Open-source Go projects categorized as Struct

Top 22 Go Struct Projects

  • kong

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

    Project mention: I'm looking for a library that can parse through a string and pickup parameters and add it to a golang object | reddit.com/r/golang | 2022-12-12
  • defaults

    Initialize structs with default values (by creasty)

    Project mention: Simple configuration for apps | reddit.com/r/golang | 2022-05-05

    Thanks, it basically bunch of battle-tested tools like viper, defaults, validators put together

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • protoc-gen-gotag

    Add custom struct tags to protobuf generated structs

    Project mention: a tool for quickly creating web and microservice code | dev.to | 2022-12-15

    Dependency plugins and tools are automatically installed after executing the command: protoc-gen-go, protoc-gen-go-grpc, protoc-gen-validate, protoc-gen-gotag, protoc-gen-go-gin, protoc-gen-go-rpc-tmpl, protoc-gen-openapiv2, protoc-gen-doc, golangci-lint, swag, go-callvis.

  • goq

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

  • goverter

    Generate type-safe Go converters by simply defining an interface

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

    Project mention: I made a mind map of the whole go standard library | reddit.com/r/golang | 2022-12-03
  • goConfig

    goconfig uses a struct as input and populates the fields of this struct with parameters from command line, environment variables and configuration file.

  • InfluxDB

    Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.

  • go-jsonstruct

    Generate Go structs from multiple JSON objects.

  • faker

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

  • binstruct

    Golang binary decoder for mapping data into the structure

  • gody

    :balloon: A lightweight struct validator for Go

  • flat

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

    Project mention: How can I unmarshall nested json to become simple json pairs Golang? | reddit.com/r/golang | 2022-08-04

    Looks like someone's written a general-purpose flattener: https://github.com/nqd/flat

  • go-httpheader

    A Go library for encoding structs into Header fields.

  • go-xmlstruct

    Generate Go structs from multiple XML documents.

    Project mention: Newbie: I have a big xml file, the content is much nested tags and what I need to do is adding a field in a very nested tag in this file. One “not elegant” way is to make thousands of structs to parse the file. Do you guys have a simple solution for a task like that. | reddit.com/r/golang | 2023-01-30

    Check out https://github.com/twpayne/go-xmlstruct.

  • straf

    Convert Golang Struct To GraphQL Object On The Fly

  • go-traits

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

  • anyflag

    Generic implementation of Cobra Value and SliceValue types

    Project mention: Bind any type to spf13/cobra flag, no boilerplate just generics | reddit.com/r/golang | 2022-09-28

    There is a better way. I want to share with you a library that I wrote that implements pflag.Value and pflag.SliceValue interfaces using Go Generics. With that library you can bind any type by just providing a parser function.

  • 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 structsdev)

  • newc

    A code generator that generates constructor code for Golang structures.

    Project mention: 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. | reddit.com/r/golang | 2022-08-05
  • gonfig

    Tag based configuration loader from different providers

  • gobetter

    GO Better - code generator for struct required fields

    Project mention: What “sucks” about Golang? | reddit.com/r/golang | 2023-03-10
  • textra

    Small package to help with struct tags (by ravsii)

    Project mention: Textra: small library for struct tags parsing (first open-source project, feedback wanted) | reddit.com/r/golang | 2022-12-07

    Link to github

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

Go Struct related posts


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

Project Stars
1 kong 1,322
2 defaults 534
3 protoc-gen-gotag 287
4 goq 233
5 goverter 214
6 typex 177
7 goConfig 158
8 go-jsonstruct 130
9 faker 72
10 binstruct 67
11 gody 62
12 flat 53
13 go-httpheader 44
14 go-xmlstruct 41
15 straf 34
16 go-traits 20
17 anyflag 14
18 gen 13
19 newc 12
20 gonfig 6
21 gobetter 5
22 textra 3
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives