Define a consistent format for wrapping errors and defining errors.
Some thoughts on how to do this:
Option 1:
return nil, fmt.Errorf("%w; unable to convert resources object to string array", err)
unable to convert workload config spec.resources to []map[string]interface; [map[filename:/path/to/my/child-resources.yaml]]; unable to convert resources object to string array; unable to mutate configuration fields; error adding flags to `init-config collection` subcommand
Option 2:
return nil, fmt.Errorf("%w - unable to convert resources object to string array", err)
unable to convert workload config spec.resources to []map[string]interface - [map[filename:/path/to/my/child-resources.yaml]] - unable to convert resources object to string array - unable to mutate configuration fields; error adding flags to `init-config collection` subcommand
Option 3:
return nil, fmt.Errorf("%w, unable to convert resources object to string array", err)
unable to convert workload config spec.resources to []map[string]interface, [map[filename:/path/to/my/child-resources.yaml]], unable to convert resources object to string array, unable to mutate configuration fields; error adding flags to `init-config collection` subcommand
These obviously aren't the only options but are some of the patterns that I have found.
Define a consistent format for wrapping errors and defining errors.
Some thoughts on how to do this:
Option 1:
Option 2:
Option 3:
These obviously aren't the only options but are some of the patterns that I have found.