Skip to content

Commit 8c95a91

Browse files
committed
update
1 parent afdf7e8 commit 8c95a91

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,3 @@
1010

1111
# Output of the go coverage tool, specifically when used with LiteIDE
1212
*.out
13-
14-
config.prod.yml

cmd/root.go

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ import (
1111
"github.com/spf13/cobra"
1212
)
1313

14-
var config string
14+
// Verbose var
15+
var Verbose bool
16+
17+
// APIKey var
18+
var APIKey string
1519

1620
var rootCmd = &cobra.Command{
1721
Use: "agent",
@@ -21,6 +25,17 @@ Uptimedog and the agent is in early stages of development, and we'd love to hear
2125
feedback at <https://github.com/Uptimedog/agent>`,
2226
}
2327

28+
func init() {
29+
rootCmd.PersistentFlags().BoolVarP(&Verbose, "verbose", "v", false, "verbose output")
30+
rootCmd.PersistentFlags().StringVarP(
31+
&APIKey,
32+
"api_key",
33+
"k",
34+
"",
35+
"Your Uptimedog API Key",
36+
)
37+
}
38+
2439
// Execute runs cmd tool
2540
func Execute() {
2641
if err := rootCmd.Execute(); err != nil {

config.dist.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)