Initial commit: Open sourcing all of the Maple Open Technologies code.
This commit is contained in:
commit
755d54a99d
2010 changed files with 448675 additions and 0 deletions
25
cloud/maplepress-backend/cmd/version/version.go
Normal file
25
cloud/maplepress-backend/cmd/version/version.go
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package version
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
const (
|
||||
Version = "0.1.0"
|
||||
)
|
||||
|
||||
// VersionCmd returns the version command
|
||||
func VersionCmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Print the version number",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
// Create console logger for CLI output
|
||||
logger, _ := zap.NewDevelopment()
|
||||
defer logger.Sync()
|
||||
|
||||
logger.Info("MaplePress Backend", zap.String("version", Version))
|
||||
},
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue