mirror of
https://github.com/octoleo/restic.git
synced 2024-11-23 21:27:34 +00:00
26 lines
432 B
Go
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
|
|
}
|