You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the feature
Allowing to customize the mage's main function would be beneficial in some situations. Current, code is half there to allow custom processing in main func. We have public ParseAndRun, Invocation, Command, and Parse functions, but some things are missing. To customize and execute already parsed Invocation, one need to have 2 additional missing bits:
function to handle parsing errors
function that run Invocation, and Command pair.
Both of those are currently an internal implementation of ParseAndRun. Splitting this function to separate public functions will allow for such customization.
What problem does this feature address?
Users might want to customize Invocation struct after parsing. For example, I want to contain mage in a build subdirectory, with its own go.mod file. To accomplish that, I like to set the following values on Invocation:
inv.WorkDir=".."inv.Dir="."
Of course, people could like to customize the execution in some other way as well.
The text was updated successfully, but these errors were encountered:
Describe the feature
Allowing to customize the mage's main function would be beneficial in some situations. Current, code is half there to allow custom processing in main func. We have public
ParseAndRun
,Invocation
,Command
, andParse
functions, but some things are missing. To customize and execute already parsedInvocation
, one need to have 2 additional missing bits:Invocation
, andCommand
pair.Both of those are currently an internal implementation of
ParseAndRun
. Splitting this function to separate public functions will allow for such customization.What problem does this feature address?
Users might want to customize
Invocation
struct after parsing. For example, I want to contain mage in abuild
subdirectory, with its owngo.mod
file. To accomplish that, I like to set the following values onInvocation
:Of course, people could like to customize the execution in some other way as well.
The text was updated successfully, but these errors were encountered: