Пример #1
0
func init() {
	melInfo = &MelInfo{
		Version:    helpers.MelVersion(),
		CommitHash: CommitHash,
		BuildDate:  BuildDate,
	}
}
Пример #2
0
package commands

import (
	"fmt"
	"github.com/chrismccluskey/mel/helpers"
	"github.com/spf13/cobra"
)

var version = &cobra.Command{
	Use:   "version",
	Short: "Print Mel's version information",
	Long:  `Find out what version of mel is installed`,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Printf("Mel, the MEdia Librarian v%s\n", helpers.MelVersion())
	},
}