Vendor cfssl and cfssljson
This commit is contained in:
27
vendor/github.com/cloudflare/cfssl/cli/version/BUILD
generated
vendored
Normal file
27
vendor/github.com/cloudflare/cfssl/cli/version/BUILD
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"version.go",
|
||||
"version_dev.go",
|
||||
],
|
||||
importmap = "k8s.io/kubernetes/vendor/github.com/cloudflare/cfssl/cli/version",
|
||||
importpath = "github.com/cloudflare/cfssl/cli/version",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["//vendor/github.com/cloudflare/cfssl/cli:go_default_library"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
42
vendor/github.com/cloudflare/cfssl/cli/version/version.go
generated
vendored
Normal file
42
vendor/github.com/cloudflare/cfssl/cli/version/version.go
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
// Package version implements the version command.
|
||||
package version
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
|
||||
"github.com/cloudflare/cfssl/cli"
|
||||
)
|
||||
|
||||
// Version stores the semantic versioning information for CFSSL.
|
||||
var version = struct {
|
||||
Major int
|
||||
Minor int
|
||||
Patch int
|
||||
Revision string
|
||||
}{1, 3, 0, "release"}
|
||||
|
||||
func versionString() string {
|
||||
return fmt.Sprintf("%d.%d.%d", version.Major, version.Minor, version.Patch)
|
||||
}
|
||||
|
||||
// Usage text for 'cfssl version'
|
||||
var versionUsageText = `cfssl version -- print out the version of CF SSL
|
||||
|
||||
Usage of version:
|
||||
cfssl version
|
||||
`
|
||||
|
||||
// FormatVersion returns the formatted version string.
|
||||
func FormatVersion() string {
|
||||
return fmt.Sprintf("Version: %s\nRevision: %s\nRuntime: %s\n", versionString(), version.Revision, runtime.Version())
|
||||
}
|
||||
|
||||
// The main functionality of 'cfssl version' is to print out the version info.
|
||||
func versionMain(args []string, c cli.Config) (err error) {
|
||||
fmt.Printf("%s", FormatVersion())
|
||||
return nil
|
||||
}
|
||||
|
||||
// Command assembles the definition of Command 'version'
|
||||
var Command = &cli.Command{UsageText: versionUsageText, Flags: nil, Main: versionMain}
|
7
vendor/github.com/cloudflare/cfssl/cli/version/version_dev.go
generated
vendored
Normal file
7
vendor/github.com/cloudflare/cfssl/cli/version/version_dev.go
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// +build !release
|
||||
|
||||
package version
|
||||
|
||||
func init() {
|
||||
version.Revision = "dev"
|
||||
}
|
Reference in New Issue
Block a user