conform icon indicating copy to clipboard operation
conform copied to clipboard

Problem with substructs and slice of substruct

Open JoydS opened this issue 2 years ago • 1 comments

Hello guys,

Im trying to implement your code but I have some issues with it.

In the case I have substruct or slice of substruct, the lib is not working.

type Request struct {
    SeveralSubRequests []*struct {
	Foo  string `json:"foo" conform:"trim"`
	Bar  string `json:"bar" conform:"trim"`
    } `json:"several_sub_requests"`
}
type Request struct {
    SubRequest *struct {
        Foo  string `json:"foo" conform:"trim"`
        Bar  string `json:"bar" conform:"trim"`
    } `json:"sub_request"`
}

JoydS avatar Jun 27 '22 12:06 JoydS

Little up on the subject ! Thanks

JoydS avatar Sep 15 '22 14:09 JoydS