2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-04 01:50:48 +00:00
restic/cmd/restic/cmd_version.go

26 lines
432 B
Go
Raw Normal View History

2015-01-16 20:26:33 +00:00
package main
import (
"fmt"
"runtime"
)
type CmdVersion struct{}
func init() {
_, err := parser.AddCommand("version",
"display version",
"The version command displays detailed information about the version",
&CmdVersion{})
if err != nil {
panic(err)
}
}
func (cmd CmdVersion) Execute(args []string) error {
2015-06-24 15:59:31 +00:00
fmt.Printf("restic %s\ncompiled at %s with %v\n",
version, compiledAt, runtime.Version())
2015-01-16 20:26:33 +00:00
return nil
}