Skip to content

Commit

Permalink
pkg/tool: small fixes to CUE docs
Browse files Browse the repository at this point in the history
Noticed some weeks ago as I was reading the docs.
And the same changes to cmd/cue, where the CUE appears copy-pasted.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Ie76af06c5aa854ae713cc700b1c0eaa3498bf6d8
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/551695
Reviewed-by: Paul Jolly <paul@myitcv.io>
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
  • Loading branch information
mvdan committed Mar 26, 2023
1 parent 4cbb563 commit 3d08fb2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
7 changes: 4 additions & 3 deletions cmd/cue/cmd/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,15 +480,16 @@ cuelang.org/go/pkg/tool/tool.cue.
// otherwise depend on its output.
Tasks
// $usage summarizes how a command takes arguments.
//
// Example:
// mycmd [-n] names
$usage?: string
// short is short description of what the command does.
// $short is short description of what the command does.
$short?: string
// long is a longer description that spans multiple lines and
// $long is a longer description that spans multiple lines and
// likely contain examples of usage of the command.
$long?: string
}
Expand All @@ -506,7 +507,7 @@ cuelang.org/go/pkg/tool/tool.cue.
Task: {
$type: "tool.Task" // legacy field 'kind' still supported for now.
// kind indicates the operation to run. It must be of the form
// $id indicates the operation to run. It must be of the form
// packagePath.Operation.
$id: =~#"\."#
Expand Down
7 changes: 4 additions & 3 deletions pkg/tool/pkg.go

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

7 changes: 4 additions & 3 deletions pkg/tool/tool.cue
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,16 @@ Command: {
// otherwise depend on its output.
Tasks

// $usage summarizes how a command takes arguments.
//
// Example:
// mycmd [-n] names
$usage?: string

// short is short description of what the command does.
// $short is short description of what the command does.
$short?: string

// long is a longer description that spans multiple lines and
// $long is a longer description that spans multiple lines and
// likely contain examples of usage of the command.
$long?: string
}
Expand All @@ -65,7 +66,7 @@ Name: =~#"^\PL([-](\PL|\PN))*$"#
Task: {
$type: "tool.Task" // legacy field 'kind' still supported for now.

// kind indicates the operation to run. It must be of the form
// $id indicates the operation to run. It must be of the form
// packagePath.Operation.
$id: =~#"\."#

Expand Down

0 comments on commit 3d08fb2

Please sign in to comment.