From 13ec9b05c7d56bc37a83a5025961e8bc0fe2e7d4 Mon Sep 17 00:00:00 2001 From: chupei Date: Mon, 1 Jun 2020 17:54:49 +0800 Subject: [PATCH] addjust diff cmd examples format --- cmd/diff.go | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/cmd/diff.go b/cmd/diff.go index 1ab0998..561aec4 100644 --- a/cmd/diff.go +++ b/cmd/diff.go @@ -34,14 +34,23 @@ import ( var diffCmd = &cobra.Command{ Use: "diff", Short: "do coverage profile diff analysis, it can also work with prow and post comments to github pull request if needed", - Example: ` goc diff --new-profile= --base-profile= // diff two local coverage profile and display - goc diff --prow-postsubmit-job= --new-profile= // diff local coverage profile with the remote one in prow job using default qiniu-credential - goc diff --prow-postsubmit-job= --new-profile= --full-diff=true // calculate and display full diff coverage between new-profile and base-profile, not concerned github changed files + Example: ` # Diff two local coverage profile and display + goc diff --new-profile= --base-profile= + + # Diff local coverage profile with the remote one in prow job using default qiniu-credential + goc diff --prow-postsubmit-job= --new-profile= + + # Calculate and display full diff coverage between new-profile and base-profile, not concerned github changed files + goc diff --prow-postsubmit-job= --new-profile= --full-diff=true + + # Diff local coverage profile with the remote one in prow job goc diff --prow-postsubmit-job= --prow-remote-profile-name= - --qiniu-credential= --new-profile= // diff local coverage profile with the remote one in prow job + --qiniu-credential= --new-profile= + + # Diff coverage profile with the remote one in prow job, and post comments to github PR goc diff --prow-postsubmit-job= --prow-profile= --github-token= --github-user= --github-comment-prefix= - --qiniu-credential= --coverage-threshold-percentage= --new-profile= // diff coverage profile with the remote one in prow job, and post comments to github PR + --qiniu-credential= --coverage-threshold-percentage= --new-profile= `, Run: func(cmd *cobra.Command, args []string) { if baseProfile != "" {