pulumi/cmd/coco/version.go
joeduffy 9d7bbcfa78 Restructure source layout for tools
This change restructures the overall structure for commands so that
all top-level tools are in the cmd/ directory, alongside the primary
coco command.  This is more "idiomatic Go" in its layout, and makes
room for additional command line tools (like cocogo for IDL).
2017-04-12 10:38:12 -07:00

22 lines
467 B
Go

// Copyright 2017 Pulumi, Inc. All rights reserved.
package main
import (
"fmt"
"github.com/spf13/cobra"
)
const version = "0.0.1" // TODO[pulumi/coconut#13]: a real auto-incrementing version number.
func newVersionCmd() *cobra.Command {
return &cobra.Command{
Use: "version",
Short: "Print Coconut's version number",
Run: runFunc(func(cmd *cobra.Command, args []string) error {
fmt.Printf("Coconut version %v\n", version)
return nil
}),
}
}