116 Resources
Golang struct Libraries
Marshmallow provides a flexible and performant JSON unmarshalling in Go. It specializes in dealing with unstructured struct - when some fields are known and some aren't, with zero performance overhead nor extra coding needed.
Marshmallow Marshmallow package provides a simple API to perform flexible and performant JSON unmarshalling in Go. Marshmallow specializes in dealing
Excel binding to struct written in Go.(Only supports Go1.18+)
exl Excel binding to struct written in Go.(Only supports Go1.18+) usage Read Excel package main import ( "fmt" "github.com/go-the-way/exl" ) type
ddl-maker generate ddl (SQL file) from Go struct.
[日本語] What is ddl-maker ddl-maker generate ddl (SQL file) from golang struct. It's only supported MySQL only now. The original code is kayac/ddl-maker
Highly configurable struct to map converter.
Mapify Highly configurable struct to map converter. Will convert maps into other maps as well (work in progress). Features configuration outside the s
Optinator - Idiomatic way to fill structs with options logic
optinator Go packages are generally start with a main struct and the package ini
Goal is to generate logger and tracer wraps around a certain struct
Goal is to generate logger and tracer wraps around a certain struct
Structscanner is a simple library to make going from database queries to structs easier
structscanner is a simple library to make going from database queries to structs easier, while retaining the flexibility of joins and mapping using struct tags.
A simple golang api generator that stores struct fields in key/value based databases
Backgen A simple golang API generator that uses key/value based databases. It does not provide the database itself, only uses a interface to access se
Tutorial code for my video Learn to Use Basic Data Structures - Slices, Structs and Maps in Golang
Learn to Use Basic Data Structures - Slices, Structs and Maps in Golang Read text from a file and split into words. Introduction to slices / lists. Co
A simple golang marshaller from commandline to a struct
flagmarshal SYNOPSIS A simple golang marshaller from commandline to a struct ParseFlags(structptr interface{}) error DESCRIPTION Very simple implement
Tag based configuration loader from different providers
Gonfig Tag-based configuration parser which loads values from different providers into typesafe struct. Installation This package needs go version 1.1
go library for complex struct mapping
Dto mapper dto-mapper is an easy-to-use library for complex struct mapping. It's intended for the creation of data transfer objects, hence the name. W
dateparse time by struct tag
dateparse_tag dateparse time by struct tag intro&简介 WithTagName() // 自定义你想要使用的tag名称,默认为dateFormat WithDefaultTagValue() // 定义这个tag的默认值,默认为 default Wit
Go package to easily convert a URL's query parameters/values into usable struct values of the correct types.
Query Param Stop accessing query strings and repeatedly parsing them into your preferred values - queryparam can do that for you! Installation go get
Tugas Alta Immersive Backend Golang Fundamental Programming (Pointer, Struct, Method, Interface)
Tatacara Melakukan Setup Tugas clone project ini dengan cara git clone https://github.com/Immersive-Backend-Resource/Pointer-Struct-Method-Interface.g
Package goshark use tshark to decode IP packet and create data struct to analyse packet.
goshark Package goshark use tshark to decode IP packet and create data struct to analyse
Light Object-Relational Environment (LORE) provides a simple and lightweight pseudo-ORM/pseudo-struct-mapping environment for Go
LORE Light Object-Relational Environment (LORE) provides a simple and lightweight pseudo-ORM/pseudo-struct-mapping environment for Go. Motivation With
Console - Commands are defined in struct extending pkg/command/create user.go
Console Creating a Command Commands are defined in struct extending pkg/command/
Transmo - Transform Model into another model based on struct for Go (Golang).
Transmo Transmo is a Go library for transform model into another model base on struct. This library detect your field name to copy that into another m
Schemable - Schemable provides basic struct mapping against a database, using the squirrel package
Schemable Schemable provides basic struct mapping against a database, using the
Time struct in Go that uses 4 bytes of memory vs the 24 bytes of time.Time
go-tinytime A tiny time object in Go. Tinytime uses 4 bytes of memory vs the 24 bytes of a standard time.Time{} A tinytime only supports dates from 19
Automatically generate tags for golang struct.
gotag is a command tool that can automatically generate tags for golang struct. Quick start Install gotag go install github.com/sycki/gotag@latest Pr
Automatically generate tags for golang struct.
gtag is a command tool that can automatically generate tags for golang struct. Quick start Install gtag into your GOPATH go install github.com/sycki/g
Structproto - Struct Prototype for golang
structproto - StructPrototype Synopsis import ( "github.com/structproto" "github.com/structproto/valuebinder" ) type mockCharacter struct { Na
GoStruct2Table - format your struct like a table.
GoStruct2Table format your struct like a table. Installing $ go get -u -v github.com/runningzyp/GoStruct2Table Simple Example import parser "github.c
Golang struct to postgres table shifter.
pg-shifter Golang struct to postgres table shifter. go1.9+ required. The main objective is to keep the table's complete schema details in golang table
Golang code generator for creating struct from json.
jsonToStruct Golang code generator for creating struct from json. INSTALLATION go get github.com/mayur-tolexo/j2s Tags: -ip=input.json [Input File (de
Package gorilla/schema fills a struct with form values.
schema Package gorilla/schema converts structs to and from form values. Example Here's a quick example: we parse POST form values and then decode them
goconfig uses a struct as input and populates the fields of this struct with parameters from command line, environment variables and configuration file.
goconfig goconfig uses a struct as input and populates the fields of this struct with parameters from command line, environment variables and configur
Tag based configuration loader from different providers
Gonfig Tag-based configuration parser which loads values from different providers into typesafe struct. Installation This package needs go version 1.1
An ease to use finit state machine golang implementation.Turn any struct to a fsm with graphviz visualization supported.
go-fsm An ease to use finit state machine golang implementation.Turn any struct to a fsm with graphviz visualization supported. usage import github.co
Convert xml and json to go struct
xj2go The goal is to convert xml or json file to go struct file. Usage Download and install it: $ go get -u -v github.com/wk30/xj2go/cmd/... $ xj [-t
Translates TOML into a Go type in your browser instantly
TOML-to-Go Translates TOML into a Go type definition. Check it out! Contributions are welcome! Open a pull request to fix a bug, or open an issue to d
Marshal data into commands struct!
Commandarrgh in a nuthsell Commandarrgh is an interface that helps you marshaling data into a command arguments structure. Maybe you have been trying
Simple struct copying for golang
Deepcopier This package is meant to make copying of structs to/from others structs a bit easier. Installation go get -u github.com/ulule/deepcopier Us
Fill struct data easily with fill tags
filler small util to fill gaps in your structs Installation $ go get github.com/yaronsumel/filler Usage package main import ( "fmt" "github.com/yar
A Go library for encoding structs into Header fields.
go-httpheader go-httpheader is a Go library for encoding structs into Header fields. install go get -u github.com/mozillazg/go-httpheader usage packag
Golang struct operations.
Golang structs Package structs implements simple functions to manipulate structs in Golang. Get it go get github.com/PumpkinSeed/structs Contains Con
Memory-Alignment: a tool to help analyze layout of fields in struct in memory
Memory Alignment Memory-Alignment is a tool to help analyze layout of fields in struct in memory. Usage go get github.com/vearne/mem-aligin Example p
Get the value in JSON by path, no need for struct
Get the value in JSON by path, no need for struct
🛠 A test fixtures replacement for Go, support struct and ent, inspired by factory_bot/factory_boy
carrier - A Test Fixtures Replacement for Go Statically Typed - 100% statically typed using code generation Developer Friendly API - explicit API with
containedctx detects is a linter that detects struct contained context.Context field
containedctx containedctx detects is a linter that detects struct contained context.Context field Instruction go install github.com/sivchari/contained
Use the command to convert arbitrary formats to Go Struct (including json, toml, yaml, etc.)
go2struct-tool Use the command to convert arbitrary formats to Go Struct (including json, toml, yaml, etc.) Installation Run the following command und
Encode and decode binary message and file formats in Go
Encode and Decode Binary Formats in Go This module wraps the package encoding/binary of the Go standard library and provides the missing Marshal() and
A go Library for scan database/sql rows to struct、slice、other types. And it support multiple databases connection management
ploto A go Library for scan database/sql rows to struct、slice、other types. And it support multiple databases connection management It's not an ORM. wo
Easy to use library and CLI utility to generate Go struct from CSV files.
csv2struct Easy to use library and CLI utility to generate Go struct from CSV files. As a benefit, it's fully compatible with csvutil. So, structs gen
Tool to visualize the graph of embedded structs in Go projects
Visualize a hierarchy of embedded Go structs This tool scans a directory of Go source code files to create a visualization of struct embedding in the
Cache list, count with filter param golang, using struct, hashkey
Dumbcache Cache list, count with filter param golang, using struct, hashkey Structure we hash your request object to md5 hashing and add a prefix coun
The kprobe package allows construction of dynamic struct based on kprobe event format descriptions.
The kprobe package allows construction of dynamic struct based on kprobe event format descriptions.
Convert json string to Golang struct
json-to-go-cli Convert json string to Golang struct How to install git clone https://github.com/tiancheng92/json-to-go-cli.git cd json-to-go-cli go bu
An interesting go struct tag expression syntax for field validation, etc.
An interesting go struct tag expression syntax for field validation, etc.
Go generator to copy values from type to type and fields from struct to struct. Copier without reflection.
Copygen is a command-line code generator that generates type-to-type and field-to-field struct code without adding any reflection or dependenc
Convert arbitrary formats to Go Struct (including json, toml, yaml, etc.)
go2struct Convert arbitrary formats to Go Struct (including json, toml, yaml, etc.) Installation Run the following command under your project: go get
💯 Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving
Package validator implements value validations for structs and individual fields based on tags.
golang struct 或其他对象向 []byte 的序列化或反序列化
bytecodec 字节流编解码 这个库实现 struct 或其他对象向 []byte 的序列化或反序列化 可以帮助你在编写 tcp 服务,或者需要操作字节流时,简化数据的组包、解包 这个库的组织逻辑 copy 借鉴了标准库 encoding/json 🙏 安装 使用 go get 安装最新版本
Go linter to check the struct literal to use field name
Structfield Find struct literals using non-labeled fields. The structfield analysis reports the usage of struct literal using non-labeled fields more
structslop is a static analyzer for Go that recommends struct field rearrangements to provide for maximum space/allocation efficiency.
structslop Package structslop defines an Analyzer that checks struct can be re-arranged fields to get optimal struct size.
Align Golang struct tags
Formattag The tool is used to align golang struct's tags. eg.: Before // TestStruct this is a test struct type TestStruct struct { ID stri
A linter that handles struct tags.
Tagliatelle A linter that handles struct tags. Supported string casing: camel pascal kebab snake goCamel Respects Go's common initialisms (e.g. HttpRe
goql is a GraphQL client package written in Go. with built-in two-way marshaling support via struct tags.
goql is a GraphQL client package written in Go. with built-in two-way marshaling support via struct tags.
Paramex is a library that binds http request parameters to a Go struct annotated with `param`.
paramex Paramex is a library that binds http request parameters to a Go struct annotated with param. Description To extract http parameters (headers,
peanut is a Go package to write tagged data structs to disk in a variety of formats.
peanut peanut is a Go package to write tagged data structs to disk in a variety of formats. Its primary purpose is to provide a single consistent inte
Golang Skeleton With Fully Managed Versions For Kick Start GoLang Project Development
Golang Skeleton With Fully Managed Versions For Kick Start GoLang Project Development There is no doubt that Golang’s good documentation and intellige
Initialize structs with default values
defaults Initialize structs with default values Supports almost all kind of types Scalar types int/8/16/32/64, uint/8/16/32/64, float32/64 uintptr, bo
Time struct in Go that uses 4 bytes of memory vs the 24 bytes of time.Time
A tiny time object in Go. Tinytime uses 4 bytes of memory vs the 24 bytes of a standard time.Time{}
☄ The golang convenient converter supports Database to Struct, SQL to Struct, and JSON to Struct.
Gormat - Cross platform gopher tool The golang convenient converter supports Database to Struct, SQL to Struct, and JSON to Struct. 中文说明 Features Data
database to golang struct
中文文档 mysql database to golang struct conversion tools base on gorm(v1/v2),You can automatically generate golang sturct from mysql database. big Camel-
Go tool to modify struct field tags
Go tool to modify/update field tags in structs. gomodifytags makes it easy to update, add or delete the tags in a struct field. You can easily add new tags, update existing tags (such as appending a new key, i.e: db, xml, etc..) or remove existing tags
Robust & Easy to use struct mapper and utility methods for Go
go-model Robust & Easy to use model mapper and utility methods for Go struct. Typical methods increase productivity and make Go development more fun ?
Copier for golang, copy value from struct to struct and more
Copier I am a copier, I copy everything from one to another Features Copy from field to field with same name Copy from method to field with same name
Encode and decode Go (golang) struct types via protocol buffers.
protostructure protostructure is a Go library for encoding and decoding a struct type over the wire. This library is useful when you want to send arbi
Go (Golang) Fake Data Generator for Struct
Docs faker Struct Data Fake Generator Faker will generate you a fake data based on your Struct. Index Support Getting Started Example Limitation Contr
A Go SQL query builder and struct mapper.
godb - a Go query builder and struct mapper godb is a simple Go query builder and struct mapper, not a full-featured ORM. godb does not manage relatio
auto generate sql from gorm model struct
gorm2sql: auto generate sql from gorm model struct A Swiss Army Knife helps you generate sql from gorm model struct. Installation go get github.com/li
Faygo is a fast and concise Go Web framework that can be used to develop high-performance web app(especially API) with fewer codes. Just define a struct handler, faygo will automatically bind/verify the request parameters and generate the online API doc.
Faygo Faygo is a fast and concise Go Web framework that can be used to develop high-performance web app(especially API) with fewer codes. Just define
Kong is a command-line parser for Go
Kong is a command-line parser for Go Introduction Help Help as a user of a Kong application Defining help in Kong Command handling Switch on the comma
Generate type-safe Go converters by simply defining an interface
goverter a "type-safe Go converter" generator goverter is a tool for creating type-safe converters. All you have to do is create an interface and exec
An interesting go struct tag expression syntax for field validation, etc.
go-tagexpr An interesting go struct tag expression syntax for field validation, etc. Usage Validator: A powerful validator that supports struct tag ex
A Go library for parsing struct tags from environment variables.
Envconfig Envconfig populates struct field values based on environment variables or arbitrary lookup functions. It supports pre-setting mutations, whi
Parsing JSON is a hassle in golang
GoJSON Parsing JSON is a hassle in golang. This package will allow you to parse and search elements in a json without structs. Install gojson go get g
A faster method to get elements from an interface (Struct or Slice type) for Go.
A faster method to get elements from an interface (Struct or Slice type) for Go.
一个使 mysql,pgsql 数据库表自动生成 go struct 的工具
db2go 一个使 mysql、pgsql 数据库表自动生成 go struct 的工具 快速使用 将项目放入到GOPATH/src目录下
[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.
typex Examine Go types and their transitive dependencies. Export results as TypeScript value objects (or types) declaration. Installation go get -u gi
RTS: request to struct. Generates Go structs from JSON server responses.
RTS: Request to Struct Generate Go structs definitions from JSON server responses. RTS defines type names using the specified lines in the route file
Generate a Go struct from XML.
zek Zek is a prototype for creating a Go struct from an XML document. The resulting struct works best for reading XML (see also #14), to create XML, y
:100:Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving
Package validator Package validator implements value validations for structs and individual fields based on tags. It has the following unique features
⚔ Go package for data validation and filtering. support Map, Struct, Form data. Go通用的数据验证与过滤库,使用简单,内置大部分常用验证、过滤器,支持自定义验证器、自定义消息、字段翻译。
Validate The package is a generic Go data validate and filter tool library. Support quick validate Map, Struct, Request(Form, JSON, url.Values, Upload
An idiomatic Go (golang) validation package. Supports configurable and extensible validation rules (validators) using normal language constructs instead of error-prone struct tags.
ozzo-validation Description ozzo-validation is a Go package that provides configurable and extensible data validation capabilities. It has the followi
Struct validation using tags
Govalid Use Govalid to validate structs. Documentation For full documentation see pkg.go.dev. Example package main import ( "fmt" "log" "strings"
:balloon: A lightweight struct validator for Go
gody Go versions supported Installation go get github.com/guiferpa/gody/v2 Usage package main import ( "encoding/json" "fmt" "net/http"
Convert xml and json to go struct
xj2go The goal is to convert xml or json file to go struct file. Usage Download and install it: $ go get -u -v github.com/wk30/xj2go/cmd/... $ xj [-t
Match regex group into go struct using struct tags and automatic parsing
regroup Simple library to match regex expression named groups into go struct using struct tags and automatic parsing Installing go get github.com/oris
Pagser is a simple, extensible, configurable parse and deserialize html page to struct based on goquery and struct tags for golang crawler
Pagser Pagser inspired by page parser。 Pagser is a simple, extensible, configurable parse and deserialize html page to struct based on goquery and str
A declarative struct-tag-based HTML unmarshaling or scraping package for Go built on top of the goquery library
goq Example import ( "log" "net/http" "astuart.co/goq" ) // Structured representation for github file name table type example struct { Title str
Golang binary decoder for mapping data into the structure
binstruct Golang binary decoder to structure Install go get -u github.com/ghostiam/binstruct Examples ZIP decoder PNG decoder Use For struct From file
Convert Golang Struct To GraphQL Object On The Fly
Straf Convert Golang Struct To GraphQL Object On The Fly Easily Create GraphQL Schemas Example Converting struct to GraphQL Object type UserExtra stru
Gountries provides: Countries (ISO-3166-1), Country Subdivisions(ISO-3166-2), Currencies (ISO 4217), Geo Coordinates(ISO-6709) as well as translations, country borders and other stuff exposed as struct data.
gountries Inspired by the countries gem for ruby. Countries (ISO-3166-1), Country Subdivisions(ISO-3166-2), Currencies (ISO 4217), Geo Coordinates(ISO
Provide Go Statistics Handler, Struct, Measure Method
Go Statistics Handler About The gosh is an abbreviation for Go Statistics Handler. This Repository is provided following functions. Go runtime statist