Skip to content

Commit 3e3d3c8

Browse files
committed
[housekeeping] deprecate better
1 parent 1ea0eee commit 3e3d3c8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cobra.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ import (
1818
"github.com/spf13/cobra"
1919
)
2020

21+
// Deprecated: Use HandlerCobra instead
2122
type Handler func(opts *cobra.Command, args []string, data HandlerData) error
22-
type HandlerCobra Handler
23+
24+
type HandlerCobra = Handler
2325

2426
func addParams(cmd *cobra.Command, op *v3.Operation, handlerData *HandlerData) {
2527
var (
@@ -196,8 +198,7 @@ func BootstrapV3Cobra(rootCmd *cobra.Command, model libopenapi.DocumentModel[v3.
196198

197199
// Bootstraps a cobra.Command with the loaded model and a handler map
198200
//
199-
// Deprecated: Will be kept for backwards compatibility.
200-
// Use BootstrapV3Cobra instead.
201+
// Deprecated: Will be kept for backwards compatibility. Use BootstrapV3Cobra instead.
201202
func BootstrapV3(rootCmd *cobra.Command, model libopenapi.DocumentModel[v3.Document], handlers map[string]Handler) error {
202203
return BootstrapV3Cobra(rootCmd, model, handlers)
203204
}

0 commit comments

Comments
 (0)