File tree Expand file tree Collapse file tree 2 files changed +22
-14
lines changed Expand file tree Collapse file tree 2 files changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -126,18 +126,22 @@ func oauthCLIFlags() []cli.Flag {
126126
127127func microcmdAuthAddOauth () * cli.Command {
128128 return & cli.Command {
129- Name : "add-oauth" ,
130- Usage : "Add new Oauth authentication source" ,
131- Action : newAuthService ().runAddOauth ,
132- Flags : oauthCLIFlags (),
129+ Name : "add-oauth" ,
130+ Usage : "Add new Oauth authentication source" ,
131+ Action : func (ctx context.Context , cmd * cli.Command ) error {
132+ return newAuthService ().runAddOauth (ctx , cmd )
133+ },
134+ Flags : oauthCLIFlags (),
133135 }
134136}
135137
136138func microcmdAuthUpdateOauth () * cli.Command {
137139 return & cli.Command {
138- Name : "update-oauth" ,
139- Usage : "Update existing Oauth authentication source" ,
140- Action : newAuthService ().runUpdateOauth ,
140+ Name : "update-oauth" ,
141+ Usage : "Update existing Oauth authentication source" ,
142+ Action : func (ctx context.Context , cmd * cli.Command ) error {
143+ return newAuthService ().runUpdateOauth (ctx , cmd )
144+ },
141145 Flags : append (oauthCLIFlags ()[:1 ], append ([]cli.Flag {& cli.Int64Flag {
142146 Name : "id" ,
143147 Usage : "ID of authentication source" ,
Original file line number Diff line number Diff line change @@ -76,9 +76,11 @@ func smtpCLIFlags() []cli.Flag {
7676
7777func microcmdAuthUpdateSMTP () * cli.Command {
7878 return & cli.Command {
79- Name : "update-smtp" ,
80- Usage : "Update existing SMTP authentication source" ,
81- Action : newAuthService ().runUpdateSMTP ,
79+ Name : "update-smtp" ,
80+ Usage : "Update existing SMTP authentication source" ,
81+ Action : func (ctx context.Context , cmd * cli.Command ) error {
82+ return newAuthService ().runUpdateSMTP (ctx , cmd )
83+ },
8284 Flags : append (smtpCLIFlags ()[:1 ], append ([]cli.Flag {& cli.Int64Flag {
8385 Name : "id" ,
8486 Usage : "ID of authentication source" ,
@@ -88,10 +90,12 @@ func microcmdAuthUpdateSMTP() *cli.Command {
8890
8991func microcmdAuthAddSMTP () * cli.Command {
9092 return & cli.Command {
91- Name : "add-smtp" ,
92- Usage : "Add new SMTP authentication source" ,
93- Action : newAuthService ().runAddSMTP ,
94- Flags : smtpCLIFlags (),
93+ Name : "add-smtp" ,
94+ Usage : "Add new SMTP authentication source" ,
95+ Action : func (ctx context.Context , cmd * cli.Command ) error {
96+ return newAuthService ().runAddSMTP (ctx , cmd )
97+ },
98+ Flags : smtpCLIFlags (),
9599 }
96100}
97101
You can’t perform that action at this time.
0 commit comments