How do I mock and add data to a nested JSON struct like the one below please?
type Info struct {
Accounts []struct {
AccountUID string `json:"accountUid"`
AccountType string `json:"accountType"`
DefaultCategory string `json:"defaultCategory"`
Currency string `json:"currency"`
CreatedAt time.Time `json:"createdAt"`
Name string `json:"name"`
} `json:"accounts"`
}
I can unmarshal the data fine coming from the API but would like to create some tests to test the main functions.