-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
mod_tidy.go
29 lines (24 loc) · 948 Bytes
/
mod_tidy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/golang"
"github.com/spf13/cobra"
)
var mod_tidyCmd = &cobra.Command{
Use: "tidy",
Short: "add missing and remove unused modules",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(mod_tidyCmd).Standalone()
mod_tidyCmd.Flags().SetInterspersed(false)
mod_tidyCmd.Flags().StringS("compat", "compat", "", "preserve additional checksums needed for given version")
mod_tidyCmd.Flags().BoolS("e", "e", false, "attempt to proceed despite errors")
mod_tidyCmd.Flags().StringS("go", "go", "", "update the 'go' directive to given version")
mod_tidyCmd.Flags().BoolS("v", "v", false, "print information about removed modules")
modCmd.AddCommand(mod_tidyCmd)
carapace.Gen(mod_tidyCmd).FlagCompletion(carapace.ActionMap{
"compat": golang.ActionVersions(),
"go": golang.ActionVersions(),
})
}