Files
pocketbase/cmd/version.go
Gani Georgiev 3d07f0211d
Some checks failed
basebuild / goreleaser (push) Has been cancelled
initial public commit
2022-07-07 00:19:05 +03:00

22 lines
536 B
Go

// 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 v%s\n", version)
},
}
}