This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git
commit 86b9e4a347a6f56c62af6ec98765a0c900884f47 Author: Rohit Yadav <ro...@apache.org> AuthorDate: Sat Apr 14 03:25:06 2018 +0530 about: add separate go file for cli name, version Signed-off-by: Rohit Yadav <ro...@apache.org> --- cmd/version.go | 2 +- config/about.go | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/cmd/version.go b/cmd/version.go index 72fde90..c07c1d7 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -24,7 +24,7 @@ func init() { Name: "version", Help: "Version info", Handle: func(r *Request) error { - fmt.Println("Apache CloudStack 🐵 cloudmonkey", r.Config.Version()) + fmt.Println(r.Config.Name(), r.Config.Version()) return nil }, }) diff --git a/config/about.go b/config/about.go index d912156..0d59518 100644 --- a/config/about.go +++ b/config/about.go @@ -1 +1,34 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + package config + +import "fmt" + +func (c *Config) Name() string { + return "Apache CloudStack 🐵 cloudmonkey" +} + +func (c *Config) Version() string { + return "6.0.0-alpha1" +} + +func (c *Config) PrintHeader() { + fmt.Println(c.Name(), c.Version()) + fmt.Println("Type \"help\" for details, \"sync\" to update API cache or press tab to list commands") + fmt.Println() +} -- To stop receiving notification emails like this one, please contact ro...@apache.org.