forked from rook/rook
21 lines
424 B
Go
21 lines
424 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/quantum/castle/pkg/cephd"
|
|
)
|
|
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Print the version number of castled",
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
fmt.Printf("cephd: %v\n", cephd.Version())
|
|
rmajor, rminor, rpatch := cephd.RadosVersion()
|
|
fmt.Printf("rados: %v.%v.%v\n", rmajor, rminor, rpatch)
|
|
return nil
|
|
},
|
|
}
|