Skip to content

Commit

Permalink
Merge pull request #10993 from fabianofranz/451_cli_usability_improve…
Browse files Browse the repository at this point in the history
…ments

Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Oct 19, 2016
2 parents b6d36fc + fc72a9d commit 9668d38
Show file tree
Hide file tree
Showing 626 changed files with 6,307 additions and 7,150 deletions.
4 changes: 4 additions & 0 deletions Godeps/Godeps.json

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

1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ verify: build
hack/verify-generated-clientsets.sh
hack/verify-generated-completions.sh
hack/verify-generated-docs.sh
hack/verify-cli-conventions.sh
PROTO_OPTIONAL=1 hack/verify-generated-protobuf.sh
hack/verify-generated-swagger-descriptions.sh
hack/verify-generated-swagger-spec.sh
Expand Down
41 changes: 23 additions & 18 deletions docs/cli_hacking_guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,17 @@ type MineOptions struct {
mineLatest bool
}
const (
mineLong = `Some long description
for my command.`
var (
mineLong = templates.LongDesc(`
Some long description
for my command.`)
mineExample = ` # Run my command's first action
%[1]s first
mineExample = templates.Examples(`
# Run my command's first action
%[1]s first
# Run my command's second action on latest stuff
%[1]s second --latest`
# Run my command's second action on latest stuff
%[1]s second --latest`)
)
// NewCmdMine implement the OpenShift cli mine command.
Expand Down Expand Up @@ -136,11 +138,12 @@ Example:
====
[source,go,numbered,options="nowrap"]
----
deployExample = ` # Display the latest deployment for the 'database' deployment config
%[1]s database
deployExample = templates.Examples(`
# Display the latest deployment for the 'database' deployment config
%[1]s database
# Start a new deployment based on the 'database' deployment config
%[1]s database --latest`
# Start a new deployment based on the 'database' deployment config
%[1]s database --latest`)
----
====

Expand Down Expand Up @@ -237,17 +240,19 @@ type DeployOptions struct {
retryDeploy bool
}
const (
var (
// 2.
deployLong = `Some long description
for the deploy command.`
deployLong = templates.LongDesc(`
Some long description
for the deploy command.`)
// 3.
deployExample = ` # Display the latest deployment for the 'database' DeploymentConfig
%[1]s database
deployExample = templates.Examples(`
# Display the latest deployment for the 'database' DeploymentConfig
%[1]s database
# Start a new deployment based on the 'database' DeploymentConfig
%[1]s database --latest`
# Start a new deployment based on the 'database' DeploymentConfig
%[1]s database --latest`)
)
// 4.
Expand Down
Loading

0 comments on commit 9668d38

Please sign in to comment.