File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ type InstallCmd struct {
1616}
1717
1818// Function Which Will Be Called When `install` is the Command.
19- func (cmd * InstallCmd ) Run (* Context ) (err error ) {
19+ func (cmd * InstallCmd ) Run () (err error ) {
2020 if _ , err := os .Stat (cmd .Target ); err == nil {
2121 cmd .createDesktopIntegration (cmd .Target )
2222 return nil
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ type ListCmd struct {
1414}
1515
1616// Function which will be executed when `list` is called.
17- func (r * ListCmd ) Run (* Context ) error {
17+ func (r * ListCmd ) Run () error {
1818 registry , err := utils .OpenRegistry ()
1919 if err != nil {
2020 return err
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ type UpdateCmd struct {
2020var NoUpdateInfo = errors .New ("there is no update information" )
2121
2222// Function Which Will Be Executed When `update` is called.
23- func (cmd * UpdateCmd ) Run (* Context ) (err error ) {
23+ func (cmd * UpdateCmd ) Run () (err error ) {
2424 if cmd .All {
2525 cmd .Targets , err = getAllTargets ()
2626 if err != nil {
Original file line number Diff line number Diff line change 77)
88
99var cli struct {
10- Debug bool `help:"Enable debug mode."`
11-
1210 Install commands.InstallCmd `cmd:"" help:"Install an application."`
1311 List commands.ListCmd `cmd:"" help:"List installed applications."`
1412 Remove commands.RemoveCmd `cmd:"" help:"Remove an application."`
@@ -18,6 +16,6 @@ var cli struct {
1816func main () {
1917 ctx := kong .Parse (& cli )
2018 // Call the Run() method of the selected parsed command.
21- err := ctx .Run (& commands. Context { Debug : cli . Debug } )
19+ err := ctx .Run ()
2220 ctx .FatalIfErrorf (err )
2321}
You can’t perform that action at this time.
0 commit comments