cmd

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2020 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "gotrain",
	Short: "GoTrain tracks trains",
	Long:  "GoTrain is a server to process real-time information about Dutch trains",
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type VersionInformation

type VersionInformation struct {
	Version string
	Commit  string
	Date    string
}

VersionInformation is a simple struct containing the version information

var Version VersionInformation

Version contains the version information

func (VersionInformation) VersionStringLong

func (v VersionInformation) VersionStringLong() string

VersionStringLong returns a version string

func (VersionInformation) VersionStringShort

func (v VersionInformation) VersionStringShort() string

VersionStringShort returns a shortened version string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL