-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
source_freshness.go
32 lines (27 loc) · 1.2 KB
/
source_freshness.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
30
31
32
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var source_freshnessCmd = &cobra.Command{
Use: "freshness",
Short: "source freshness",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(source_freshnessCmd).Standalone()
source_freshnessCmd.Flags().StringP("output", "o", "", "Specify the output path for the json report.")
source_freshnessCmd.Flags().String("selector", "", "The selector name to use, as defined in selectors.yml")
source_freshnessCmd.Flags().String("state", "", "Use the given directory as the source for json files to compare with this project.")
source_freshnessCmd.Flags().StringP("target", "t", "", "Which target to load for the given profile")
source_freshnessCmd.Flags().String("threads", "", "Specify number of threads to use.")
source_freshnessCmd.Flags().String("vars", "", "Supply variables to the project.")
addProjectDirFlag(source_freshnessCmd)
addSelectionFlags(source_freshnessCmd)
addProfileFlag(source_freshnessCmd)
sourceCmd.AddCommand(source_freshnessCmd)
carapace.Gen(source_freshnessCmd).FlagCompletion(carapace.ActionMap{
"output": carapace.ActionFiles(),
"state": carapace.ActionDirectories(),
})
}