[#82] removed version cmd and make use of cobra.Version

This commit is contained in:
Valley authored and GitHub committed 2022-07-12 07:57:36 +03:00
1 parent 320d1482a4
commit ce857985be
2 files changed
+7 -27

No files matched your search

-21
View File
@@ -1,21 +0,0 @@
// Package cmd implements various PocketBase system commands.
package cmd
import (
"fmt"
"github.com/pocketbase/pocketbase/core"
"github.com/spf13/cobra"
)
// NewVersionCommand creates and returns new command that prints
// the current PocketBase version.
func NewVersionCommand(app core.App, version string) *cobra.Command {
return &cobra.Command{
Use: "version",
Short: "Prints the current PocketBase app version",
Run: func(command *cobra.Command, args []string) {
fmt.Printf("PocketBase %s\n", version)
},
}
}