This PR removes the knowledge of a default configuration from go-gh and replaces it with the ability to supply a fallback configuration to the config.Read function. This removes application level knowledge from go-gh and allows us to push it back into gh. One decision I made was that the fallback configuration would not be used unless both config.yml and hosts.yml were not found, previously the default configuration would be used whenever config.yml was not found. This change feels appropriate as we are now treating config.yml and hosts.yml as one single configuration and hides the details that they are actually two separate files from the caller.
⚠️ Note that this is a breaking change to the interface for config.Read which is exported, but in located in the config package which is only meant for use inside gh and has a warning about non-backwards compatible changes.
This PR removes the knowledge of a default configuration from
go-gh
and replaces it with the ability to supply a fallback configuration to theconfig.Read
function. This removes application level knowledge fromgo-gh
and allows us to push it back intogh
. One decision I made was that the fallback configuration would not be used unless bothconfig.yml
andhosts.yml
were not found, previously the default configuration would be used wheneverconfig.yml
was not found. This change feels appropriate as we are now treatingconfig.yml
andhosts.yml
as one single configuration and hides the details that they are actually two separate files from the caller.⚠️ Note that this is a breaking change to the interface for
config.Read
which is exported, but in located in theconfig
package which is only meant for use insidegh
and has a warning about non-backwards compatible changes.