2
2
mirror of https://github.com/octoleo/restic.git synced 2024-05-29 07:00:49 +00:00
restic/cmd/restic/cmd_version.go
Alexander Neumann 9e9177ab73 Add build.go
2015-06-24 20:29:58 +02:00

26 lines
432 B
Go

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 {
fmt.Printf("restic %s\ncompiled at %s with %v\n",
version, compiledAt, runtime.Version())
return nil
}