Files
plainleaf/server/cmd/version.go
T
Zef HemelandGitHub a524c64884 Go backend (#1555)
* Replaces old Deno server with a Go implementation
* Restructured the code base accordingly
2025-09-19 13:23:20 +02:00

23 lines
414 B
Go

package cmd
import (
"fmt"
"log"
"github.com/silverbulletmd/silverbullet/server"
"github.com/spf13/cobra"
)
func VersionCommand(versionFileText string) *cobra.Command {
return &cobra.Command{
Use: "version",
Run: func(cmd *cobra.Command, args []string) {
version, err := server.ParseVersionFromTypeScript(versionFileText)
if err != nil {
log.Fatal(err)
}
fmt.Println(version)
},
}
}