Skip to content

Commit

Permalink
fix: resolve comment for Two-Hearts
Browse files Browse the repository at this point in the history
Signed-off-by: Junjie Gao <[email protected]>
  • Loading branch information
JeyJeyGao committed Jan 6, 2025
1 parent 71f522a commit ec7fe13
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions cmd/notation/blob/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (
"github.com/spf13/cobra"
)

// Cmd returns the command for blob
// Cmd returns the commands for blob
func Cmd() *cobra.Command {
command := &cobra.Command{
Use: "blob [commnad]",
Short: "Sign, verify and inspect signatures associated with blobs",
Use: "blob [command]",
Short: "Sign, inspect, and verify signatures and configure trust policies",
Long: "Sign, inspect, and verify signatures and configure trust policies.",
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/notation/blob/policy/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package policy provides the import and show command for blob trust policy.
// Package policy provides the import and show commands for blob trust policy.
package policy

import (
Expand Down
7 changes: 5 additions & 2 deletions cmd/notation/blob/policy/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ func importCmd() *cobra.Command {
var opts importOpts
command := &cobra.Command{
Use: "import [flags] <file_path>",
Short: "Import trust policy configuration from a JSON file",
Short: "Import blob trust policy configuration from a JSON file",
Long: `Import blob trust policy configuration from a JSON file.
Example - Import trust policy configuration from a file:
Example - Import blob trust policy configuration from a file:
notation blob policy import my_policy.json
Example - Import blob trust policy and override existing configuration:
notation blob policy import my_policy.json --force
`,
Args: func(cmd *cobra.Command, args []string) error {
if len(args) != 1 {
Expand Down
4 changes: 2 additions & 2 deletions cmd/notation/blob/policy/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
func showCmd() *cobra.Command {
command := &cobra.Command{
Use: "show [flags]",
Short: "Show trust policy configuration",
Short: "Show blob trust policy configuration",
Long: `Show blob trust policy configuration.
Example - Show current blob trust policy configuration:
Expand Down Expand Up @@ -59,7 +59,7 @@ func runShow() error {
err = doc.Validate()
}
if err != nil {
fmt.Fprintf(os.Stderr, "Existing blob trust policy file is invalid, you may update or create a new one via `notation blob policy import <path-to-policy.json>`\n")
fmt.Fprintf(os.Stderr, "Existing blob trust policy file is invalid, you may update or create a new one via `notation blob policy import <path-to-policy.json>`. Please visit https://github.com/notaryproject/specifications/blob/main/specs/trust-store-trust-policy.md#trust-policy-for-blobs to find a valid blob trust policy example.\n")
os.Stdout.Write(policyJSON)
return err
}
Expand Down

0 comments on commit ec7fe13

Please sign in to comment.