Skip to content

Commit

Permalink
cmd/cue: add mod registry example to help text
Browse files Browse the repository at this point in the history
A user on Slack was getting confused about how to use this command.
Add a short example to start the registry and then use it.

While here, don't start the help text with an empty line.

Signed-off-by: Daniel Martí <[email protected]>
Change-Id: I66815a4791232fc27a6ccba0988cf037ef6dae28
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1199981
Reviewed-by: Matthew Sackman <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
  • Loading branch information
mvdan committed Aug 27, 2024
1 parent eeec3f5 commit 9f620c2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/cue/cmd/modregistry.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,16 @@ This command starts an OCI-compliant server that stores all its
contents in memory. It can serve as a scratch CUE modules registry
for use in testing.
For example, start a local registry with:
cue mod registry localhost:8080
and point CUE_REGISTRY to it to publish a module version:
CUE_REGISTRY=localhost:8080 cue mod publish v0.0.1
Note: this command might be removed or changed significantly in the future.
`,
`[1:],
RunE: mkRunE(c, runModRegistry),
Args: cobra.MaximumNArgs(1),
}
Expand Down

0 comments on commit 9f620c2

Please sign in to comment.