README ΒΆ Overview Structator is simple tool for copy specific fields a new struct, including metadata. Features Simple Coverage Compatible with slice Tag copy Usage package main import ( "github.com/lab210-dev/structator" "log" ) type Foo struct { Counter int `json:"int"` Value string `json:"value"` Struct Bar `json:"struct"` Slice []Bar `json:"Slice"` } type Bar struct { Value string `json:"value"` } func main() { payload := Foo{Value: "foo", Struct: Bar{Value: "bar"}} log.Printf("%v", structator.From(payload, "Value", "Struct.Bar")) // print: {Value:foo Struct:{Value:bar}} } π€ Contributions Contributors to the package are encouraged to help improve the code. Expand βΎ Collapse β΄ Documentation ΒΆ Index ΒΆ func From(source any, fields ...string) any Constants ΒΆ This section is empty. Variables ΒΆ This section is empty. Functions ΒΆ func From ΒΆ func From(source any, fields ...string) any Types ΒΆ This section is empty. Source Files ΒΆ View all Source files structator.go Click to show internal directories. Click to hide internal directories.