1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-12-07 10:39:05 +02:00

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

This commit is contained in:
Valley
2022-07-12 12:57:36 +08:00
committed by GitHub
parent 320d1482a4
commit ce857985be
2 changed files with 7 additions and 27 deletions

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)
},
}
}