-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
36 lines (30 loc) · 727 Bytes
/
main.go
File metadata and controls
36 lines (30 loc) · 727 Bytes
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
33
34
35
36
package main
import (
"fmt"
"os"
"github.com/audunmo/tf-targeter/cmd"
"github.com/audunmo/tf-targeter/internal/service"
"github.com/spf13/cobra"
)
func main() {
s := service.New()
RootCmd.AddCommand(cmd.NewRunCmd(s))
Execute()
}
var RootCmd = &cobra.Command{
Use: "tf-targeter",
Short: "Terraform Targeter helps you interacitvely construct an apply command with mutliple explicit targets",
Long: "Terraform Targeter helps you interacitvely construct an apply command with mutliple explicit targets",
Run: func(cmd *cobra.Command, args []string) {
err := cmd.Help()
if err != nil {
panic(err)
}
},
}
func Execute() {
if err := RootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}