Something went wrong. Try again.
A command-line interface for tangled, the decentralized Git collaboration platform built on the AT Protocol. eric-wien.tngl.io/tng-cli
cli git atproto tangled
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031package version
import ( "fmt"
"github.com/spf13/cobra" "tangled.org/eric.wien/tng-cli/internal/build" "tangled.org/eric.wien/tng-cli/pkg/cmdutil")
func NewCmdVersion(f *cmdutil.Factory) *cobra.Command { cmd := &cobra.Command{ Use: "version", Short: "Print the version of tng", Hidden: false, Args: cmdutil.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { version := build.Version if build.Date != "" { version = fmt.Sprintf("%s (%s)", version, build.Date) } if build.Commit != "" { version = fmt.Sprintf("%s, commit %s", version, build.Commit) } fmt.Fprintf(f.IOStreams.Out, "tng version %s\n", version) return nil }, } return cmd}