fix gofmt and add docs

Signed-off-by: qiminghu.hqm <qiminghu.hqm@ant-financial.com>
pull/6415/head
qiminghu.hqm 6 years ago
parent 2cfa8cbb8a
commit 5c99e95f2c

@ -280,7 +280,7 @@ func (i *inspectCmd) run() error {
} }
fmt.Fprintln(i.out, string(readme.Value)) fmt.Fprintln(i.out, string(readme.Value))
} }
if (i.output == templatesOnly || i.output == all) && chrt.Templates != nil { if (i.output == templatesOnly || i.output == all) && chrt.Templates != nil {
for index, template := range chrt.Templates { for index, template := range chrt.Templates {
if index != 0 || i.output == all { if index != 0 || i.output == all {
@ -291,7 +291,6 @@ func (i *inspectCmd) run() error {
fmt.Fprintln(i.out, string(template.Data)) fmt.Fprintln(i.out, string(template.Data))
} }
} }
return nil return nil
} }
@ -318,4 +317,3 @@ func containsString(slice []string, s string, modifier func(s string) string) bo
} }
return false return false
} }

@ -18,7 +18,7 @@ package main
import ( import (
"bytes" "bytes"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"os" "os"
"strings" "strings"
@ -152,4 +152,3 @@ func TestInspectPreReleaseChart(t *testing.T) {
}) })
} }
} }

@ -0,0 +1,46 @@
## helm inspect templates
shows inspect templates
### Synopsis
This command inspects a chart (directory, file, or URL) and displays the contents
of all templates file
```
helm inspect templates [CHART] [flags]
```
### Options
```
--ca-file string Chart repository url where to locate the requested chart
--cert-file string Verify certificates of HTTPS-enabled servers using this CA bundle
--devel Use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored.
-h, --help help for templates
--key-file string Identify HTTPS client using this SSL key file
--keyring string Path to the keyring containing public verification keys (default "~/.gnupg/pubring.gpg")
--repo string Chart repository url where to locate the requested chart
--verify Verify the provenance data for this chart
--version string Version of the chart. By default, the newest chart is shown
```
### Options inherited from parent commands
```
--debug Enable verbose output
--home string Location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string Address of Tiller. Overrides $HELM_HOST
--kube-context string Name of the kubeconfig context to use
--kubeconfig string Absolute path of the kubeconfig file to be used
--tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300)
--tiller-namespace string Namespace of Tiller (default "kube-system")
```
### SEE ALSO
* [helm inspect](helm_inspect.md) - Inspect a chart
###### Auto generated by spf13/cobra on 12-Sep-2019
Loading…
Cancel
Save