mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-03 03:38:15 +00:00
Use dedent for the kubectl commands
The one side effect is that for the "kubectl help" commands a newline is prepended to output, which will alter the yaml output. Here we use dedent to format the code to match the output. hack/update-generated-docs.sh has been run and the affected files have been added. Note: for describe.go we added a period to the end of an output message.
This commit is contained in:
@@ -20,18 +20,20 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/renstrom/dedent"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"k8s.io/kubernetes/pkg/kubectl"
|
||||
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
|
||||
)
|
||||
|
||||
const (
|
||||
namespaceLong = `
|
||||
Create a namespace with the specified name.`
|
||||
var (
|
||||
namespaceLong = dedent.Dedent(`
|
||||
Create a namespace with the specified name.`)
|
||||
|
||||
namespaceExample = ` # Create a new namespace named my-namespace
|
||||
kubectl create namespace my-namespace`
|
||||
namespaceExample = dedent.Dedent(`
|
||||
# Create a new namespace named my-namespace
|
||||
kubectl create namespace my-namespace`)
|
||||
)
|
||||
|
||||
// NewCmdCreateNamespace is a macro command to create a new namespace
|
||||
|
||||
Reference in New Issue
Block a user