refactor: openpitrix module

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2019-09-25 14:07:15 +08:00
parent d0dc66cf28
commit 1b5681c12b
314 changed files with 72092 additions and 25762 deletions

View File

@@ -0,0 +1 @@
z_update_version.go

9
vendor/openpitrix.io/openpitrix/pkg/version/Makefile generated vendored Normal file
View File

@@ -0,0 +1,9 @@
# Copyright 2017 The OpenPitrix Authors. All rights reserved.
# Use of this source code is governed by a Apache license
# that can be found in the LICENSE file.
default:
go generate
clean:
-rm z_update_version.go

26
vendor/openpitrix.io/openpitrix/pkg/version/version.go generated vendored Normal file
View File

@@ -0,0 +1,26 @@
// Copyright 2017 The OpenPitrix Authors. All rights reserved.
// Use of this source code is governed by a Apache license
// that can be found in the LICENSE file.
//go:generate go run gen_helper.go
//go:generate go fmt
package version
import "fmt"
var (
ShortVersion = "dev"
GitSha1Version = "git-sha1"
BuildDate = "2017-01-01"
)
func PrintVersionInfo(printer func(string, ...interface{})) {
printer("Release OpVersion: %s", ShortVersion)
printer("Git Commit Hash: %s", GitSha1Version)
printer("Build Time: %s", BuildDate)
}
func GetVersionString() string {
return fmt.Sprintf("%s; git: %s; build time: %s", ShortVersion, GitSha1Version, BuildDate)
}