remove outdated docs and add simple version command

This commit is contained in:
iwilltry42 2019-10-30 15:55:03 +01:00
parent e22299f485
commit 18a3db3d9b
2 changed files with 8 additions and 33 deletions

View File

@ -2,24 +2,4 @@
## Functionality
```shell
COMMANDS:
check-tools, ct Check if docker is running
shell Start a subshell for a cluster
create, c Create a single- or multi-node k3s cluster in docker containers
delete, d, del Delete cluster
stop Stop cluster
start Start a stopped cluster
list, ls, l List all clusters
get-kubeconfig Get kubeconfig location for cluster
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--verbose Enable verbose output
--help, -h show help
--version, -v print the version
```
## Compatibility with `k3s` functionality/options
... under construction ...

21
main.go
View File

@ -23,19 +23,6 @@ func main() {
app.Name = "k3d"
app.Usage = "Run k3s in Docker!"
app.Version = version.GetVersion()
app.Authors = []cli.Author{
{
Name: "Thorsten Klein",
Email: "iwilltry42@gmail.com",
},
{
Name: "Rishabh Gupta",
Email: "r.g.gupta@outlook.com",
},
{
Name: "Darren Shepherd",
},
}
// commands that you can execute
app.Commands = []cli.Command{
@ -237,6 +224,14 @@ func main() {
},
Action: run.ImportImage,
},
{
Name: "version",
Usage: "print k3d and k3s version",
Action: func(c *cli.Context) {
fmt.Println("k3d version", version.GetVersion())
fmt.Println("k3s version", version.GetK3sVersion())
},
},
}
// Global flags