MCPcopy
hub / github.com/helm/helm / newVerifyCmd

Function newVerifyCmd

pkg/cmd/verify.go:39–70  ·  view source on GitHub ↗
(out io.Writer)

Source from the content-addressed store, hash-verified

37`
38
39func newVerifyCmd(out io.Writer) *cobra.Command {
40 client := action.NewVerify()
41
42 cmd := &cobra.Command{
43 Use: "verify PATH",
44 Short: "verify that a chart at the given path has been signed and is valid",
45 Long: verifyDesc,
46 Args: require.ExactArgs(1),
47 ValidArgsFunction: func(_ *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective) {
48 if len(args) == 0 {
49 // Allow file completion when completing the argument for the path
50 return nil, cobra.ShellCompDirectiveDefault
51 }
52 // No more completions, so disable file completion
53 return noMoreArgsComp()
54 },
55 RunE: func(_ *cobra.Command, args []string) error {
56 result, err := client.Run(args[0])
57 if err != nil {
58 return err
59 }
60
61 fmt.Fprint(out, result)
62
63 return nil
64 },
65 }
66
67 cmd.Flags().StringVar(&client.Keyring, "keyring", defaultKeyring(), "keyring containing public keys")
68
69 return cmd
70}

Callers 1

newRootCmdWithConfigFunction · 0.85

Calls 5

RunMethod · 0.95
NewVerifyFunction · 0.92
ExactArgsFunction · 0.92
noMoreArgsCompFunction · 0.85
defaultKeyringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…