-
Notifications
You must be signed in to change notification settings - Fork 554
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(cli): add version info & commit id for debug
- Loading branch information
Showing
3 changed files
with
16 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
package cli | ||
|
||
import ( | ||
"fmt" | ||
"log" | ||
"os" | ||
|
||
"github.com/docopt/docopt-go" | ||
) | ||
|
||
var BannerVersion = "cdk v0.1.10" | ||
var Args docopt.Opts | ||
var GitCommit string | ||
|
||
var BannerVersion = fmt.Sprintf("%s %s", "CDK Version(GitCommit):", GitCommit) | ||
|
||
var BannerHeader = `Container DucK | ||
Zero-dependency k8s/docker/serverless penetration toolkit by <[email protected]> | ||
var BannerHeader = fmt.Sprintf(`Container DucK | ||
%s | ||
Zero-dependency k8s/docker/serverless penetration toolkit by cdxy & neargle | ||
Find tutorial, configuration and use-case in https://github.com/cdk-team/CDK/wiki | ||
` | ||
`, BannerVersion) | ||
|
||
var BannerContainer = BannerHeader + ` | ||
Usage: | ||
|
@@ -64,8 +69,6 @@ Example: | |
2. inside serverless function service execute "./cdk-serverless /code 1.2.3.4 999" | ||
` | ||
|
||
var Args docopt.Opts | ||
|
||
func parseDocopt() { | ||
args, err := docopt.ParseArgs(BannerContainer, os.Args[1:], BannerVersion) | ||
if err != nil { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package util |