pointerstructure icon indicating copy to clipboard operation
pointerstructure copied to clipboard

Feature request: set struct fields

Open glacials opened this issue 2 years ago • 0 comments

Thanks for your hard work on this great library! I'm wondering if there are plans to support setting a struct field via pointer? e.g.

type Config struct{
    Email string
}
var c Config
_, err := pointerstructure.Set(&c, "/Email", "[email protected]")
// Returns error "set /Email: invalid value kind: struct"

glacials avatar Aug 11 '23 20:08 glacials