1
0

version.go 398 B

1234567891011121314151617181920
  1. package commands
  2. import (
  3. "fmt"
  4. "github.com/docker/ecs-plugin/internal"
  5. "github.com/spf13/cobra"
  6. )
  7. func VersionCommand() *cobra.Command {
  8. return &cobra.Command{
  9. Use: "version",
  10. Short: "Show version.",
  11. RunE: func(cmd *cobra.Command, args []string) error {
  12. fmt.Fprintf(cmd.OutOrStdout(), "Docker ECS plugin %s (%s)\n", internal.Version, internal.GitCommit)
  13. return nil
  14. },
  15. }
  16. }