Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

dynamic-struct

> 编程语言
Open source

Golang package for editing struct's fields during runtime and mapping structs to other structs.

729 stars0 likes0 views
WebsiteGitHub

About

Golang package for editing struct's fields during runtime and mapping structs to other structs.

Golang dynamic struct

Package dynamic struct provides possibility to dynamically, in runtime, extend or merge existing defined structs or to provide completely new struct.

Main features:

  • Building completely new struct in runtime
  • Extending existing struct in runtime
  • Merging multiple structs in runtime
  • Adding new fields into struct
  • Removing existing fields from struct
  • Modifying fields' types and tags
  • Easy reading of dynamic structs
  • Mapping dynamic struct with set values to existing struct
  • Make slices and maps of dynamic structs

Works out-of-the-box with:

  • https://github.com/go-playground/form
  • https://github.com/go-playground/validator
  • https://github.com/leebenson/conform
  • https://golang.org/pkg/encoding/json/
  • ...

Benchmarks

Environment:

  • MacBook Pro (13-inch, Early 2015), 2,7 GHz Intel Core i5
  • go version go1.11 darwin/amd64
…

Add new struct

…

Extend existing struct

…

Merge existing structs

…

Read dynamic struct

…

Make a slice of dynamic struct

…

Make a map of dynamic struct

…

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Godynamicgogolangruntime

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言