create a function that works as path resolver for columns but for relations.
instead of filling up a resolver with repeatable code like below
func fetchLightsailInstanceAddOns(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- interface{}) error {
instance := parent.Item.(types.Instance)
res <- instance.AddOns
return nil
}
That would be nice to just set a resovler
{
Name: "aws_lightsail_instance_add_ons",
Description: "Describes an add-on that is enabled for an Amazon Lightsail resource.",
//Resolver: fetchLightsailInstanceAddOns,
Resolver: schema.RelationPathResolver("AddOns"),
IgnoreInTests: true,
Columns: []schema.Column{
...
create a function that works as path resolver for columns but for relations.
instead of filling up a resolver with repeatable code like below
That would be nice to just set a resovler