refactor to use app package instead of service
refactor app to be composable
This commit is contained in:
10
internal/utils/shellcomp/completion.go
Normal file
10
internal/utils/shellcomp/completion.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package shellcomp
|
||||
|
||||
import "github.com/spf13/cobra"
|
||||
|
||||
// CompletionFunc returns a function that provides shell completion for the given options.
|
||||
func CompletionFunc(options []string) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
|
||||
return func(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
|
||||
return options, cobra.ShellCompDirectiveDefault
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user