Skip to content

Commit

Permalink
Update go-md2man so godep restore/save work
Browse files Browse the repository at this point in the history
  • Loading branch information
eparis committed Aug 3, 2015
1 parent b73c53c commit 89dc3d5
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 67 deletions.
14 changes: 7 additions & 7 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 2 additions & 13 deletions cmd/genman/gen_kubectl_man.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/cmd/genutils"
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd"
cmdutil "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/util"
"github.com/cpuguy83/go-md2man/mangen"
"github.com/russross/blackfriday"
mangen "github.com/cpuguy83/go-md2man/md2man"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
Expand Down Expand Up @@ -144,17 +143,7 @@ func genMarkdown(command *cobra.Command, parent, docsDir string) {
January 2015, Originally compiled by Eric Paris (eparis at redhat dot com) based on the kubernetes source material, but hopefully they have been automatically generated since!
`)

renderer := mangen.ManRenderer(0)
extensions := 0
extensions |= blackfriday.EXTENSION_NO_INTRA_EMPHASIS
extensions |= blackfriday.EXTENSION_TABLES
extensions |= blackfriday.EXTENSION_FENCED_CODE
extensions |= blackfriday.EXTENSION_AUTOLINK
extensions |= blackfriday.EXTENSION_SPACE_HEADERS
extensions |= blackfriday.EXTENSION_FOOTNOTES
extensions |= blackfriday.EXTENSION_TITLEBLOCK

final := blackfriday.Markdown(out.Bytes(), renderer, extensions)
final := mangen.Render(out.Bytes())

filename := docsDir + dname + ".1"
outFile, err := os.Create(filename)
Expand Down
2 changes: 1 addition & 1 deletion docs/man/man1/kubectl-config-view.1
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ You can use \-\-output=template \-\-template=TEMPLATE to extract specific values
$ kubectl config view

// Get the password for the e2e user
$ kubectl config view \-o template \-\-template='\{\{range .users\}\}\{\{ if eq .name "e2e" \}\}\{\{ index .user.password \}\}\{\{end\}\}\{\{end\}\}'
$ kubectl config view \-o template \-\-template='{{range .users}}{{ if eq .name "e2e" }}{{ index .user.password }}{{end}}{{end}}'

.fi
.RE
Expand Down
2 changes: 1 addition & 1 deletion docs/man/man1/kubectl-config.1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ config modifies kubeconfig files using subcommands like "kubectl config set curr
The loading order follows these rules:
1. If the \-\-kubeconfig flag is set, then only that file is loaded. The flag may only be set once and no merging takes place.
2. If $KUBECONFIG environment variable is set, then it is used a list of paths (normal path delimitting rules for your system). These paths are merged together. When a value is modified, it is modified in the file that defines the stanza. When a value is created, it is created in the first file that exists. If no files in the chain exist, then it creates the last file in the list.
3. Otherwise, $\{HOME\}/.kube/config is used and no merging takes place.
3. Otherwise, ${HOME}/.kube/config is used and no merging takes place.


.SH OPTIONS
Expand Down
2 changes: 1 addition & 1 deletion docs/man/man1/kubectl-get.1
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ $ kubectl get replicationcontroller web
$ kubectl get \-o json pod web\-pod\-13je7

// Return only the phase value of the specified pod.
$ kubectl get \-o template web\-pod\-13je7 \-\-template=\{\{.status.phase\}\} \-\-api\-version=v1
$ kubectl get \-o template web\-pod\-13je7 \-\-template={{.status.phase}} \-\-api\-version=v1

// List all replication controllers and services together in ps output format.
$ kubectl get rc,services
Expand Down
2 changes: 1 addition & 1 deletion docs/man/man1/kubectl-patch.1
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ JSON and YAML formats are accepted.
.nf

// Partially update a node using strategic merge patch
kubectl patch node k8s\-node\-1 \-p '\{"spec":\{"unschedulable":true\}\}'
kubectl patch node k8s\-node\-1 \-p '{"spec":{"unschedulable":true}}'

.fi
.RE
Expand Down
2 changes: 1 addition & 1 deletion docs/man/man1/kubectl-run.1
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ $ kubectl run nginx \-\-image=nginx \-\-replicas=5
$ kubectl run nginx \-\-image=nginx \-\-dry\-run

// Start a single instance of nginx, but overload the spec of the replication controller with a partial set of values parsed from JSON.
$ kubectl run nginx \-\-image=nginx \-\-overrides='\{ "apiVersion": "v1", "spec": \{ ... \} \}'
$ kubectl run nginx \-\-image=nginx \-\-overrides='{ "apiVersion": "v1", "spec": { ... } }'

.fi
.RE
Expand Down

0 comments on commit 89dc3d5

Please sign in to comment.