Registry / utility / ompluscator-dynamic-struct

ompluscator-dynamic-struct

JSON →
library1.4.0gogounverified

Package dynamic-struct provides a way to create Go structs dynamically at runtime.

go get github.com/ompluscator/dynamic-struct
INSTALL
IMPORT
SIG · OMPLUSCATOR-DYNAMI
O
ompluscator-dynamic-struct
utilitygov1.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dynamicstruct
github.com/ompluscator/dynamic-struct

Creates a dynamic struct with fields and sets values.

package main import ( "fmt" "github.com/ompluscator/dynamic-struct" ) func main() { instance := dynamicstruct.NewStruct(). AddField("Name", "string", ``). AddField("Age", "int", ``). Build(). NewStructInstance() instance.Set("Name", "John") instance.Set("Age", 30) fmt.Println(instance.FieldByName("Name")) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.4.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
ompluscator-dynamic-struct — go get ompluscator-dynamic-struct · libregistry