-
Notifications
You must be signed in to change notification settings - Fork 15
/
checkpointctl.go
39 lines (28 loc) · 730 Bytes
/
checkpointctl.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
// SPDX-License-Identifier: Apache-2.0
package main
import (
"os"
cmd "github.com/checkpoint-restore/checkpointctl/cmd"
"github.com/spf13/cobra"
)
var (
name string
version string
)
func main() {
rootCommand := &cobra.Command{
Use: name,
Short: name + " is a tool to read and manipulate checkpoint archives",
Long: name + " is a tool to read and manipulate checkpoint archives as " +
"created by Podman, CRI-O and containerd",
SilenceUsage: true,
}
rootCommand.AddCommand(cmd.Show())
rootCommand.AddCommand(cmd.Inspect())
rootCommand.AddCommand(cmd.MemParse())
rootCommand.AddCommand(cmd.List())
rootCommand.Version = version
if err := rootCommand.Execute(); err != nil {
os.Exit(1)
}
}