-
Notifications
You must be signed in to change notification settings - Fork 110
/
Copy pathkeys.go
46 lines (40 loc) · 1.03 KB
/
keys.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package operator
import (
"fmt"
"strings"
"github.com/Layr-Labs/eigenlayer-cli/pkg/operator/keys"
"github.com/Layr-Labs/eigenlayer-cli/pkg/utils"
"github.com/urfave/cli/v2"
)
func KeysCmd(p utils.Prompter) *cli.Command {
var keysCmd = &cli.Command{
Name: "keys",
Usage: "Manage the operator's keys",
Before: func(context *cli.Context) error {
deprecationMessage()
return nil
},
After: func(context *cli.Context) error {
deprecationMessage()
return nil
},
Subcommands: []*cli.Command{
keys.CreateCmd(p),
keys.ListCmd(),
keys.ImportCmd(p),
keys.ExportCmd(p),
},
}
return keysCmd
}
func deprecationMessage() {
line1 := "# The keys commands have been moved to the 'keys' subcommand. #"
line2 := "# Please see 'eigenlayer keys --help' for more information. #"
line3 := "# This command will be deprecated in the future. #"
fmt.Println(strings.Repeat("#", len(line1)))
fmt.Println(line1)
fmt.Println(line2)
fmt.Println(line3)
fmt.Println(strings.Repeat("#", len(line1)))
fmt.Println()
}