File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,11 @@ func add() *cobra.Command {
2323 cmd := & cobra.Command {
2424 Use : "add <source>" ,
2525 Short : "Add an extension to the marketplace" ,
26- Args : cobra .ExactArgs (1 ),
26+ Example : strings .Join ([]string {
27+ " marketplace add https://domain.tld/extension.vsix --extensions-dir ./extensions" ,
28+ " marketplace add extension.vsix --extensions-dir ./extensions" ,
29+ }, "\n " ),
30+ Args : cobra .ExactArgs (1 ),
2731 RunE : func (cmd * cobra.Command , args []string ) error {
2832 ctx , cancel := context .WithCancel (cmd .Context ())
2933 defer cancel ()
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package cli
22
33import (
44 "github.com/spf13/cobra"
5+ "strings"
56)
67
78func Root () * cobra.Command {
@@ -10,7 +11,9 @@ func Root() *cobra.Command {
1011 SilenceErrors : true ,
1112 SilenceUsage : true ,
1213 Long : "Code extension marketplace" ,
13- Example : " marketplace server --extensions-dir /path/to/extensions" ,
14+ Example : strings .Join ([]string {
15+ " marketplace server --extensions-dir ./extensions" ,
16+ }, "\n " ),
1417 }
1518
1619 cmd .AddCommand (add (), server (), version ())
Original file line number Diff line number Diff line change 77 "net/http"
88 "os/signal"
99 "path/filepath"
10+ "strings"
1011 "time"
1112
1213 "github.com/spf13/cobra"
@@ -30,6 +31,9 @@ func server() *cobra.Command {
3031 cmd := & cobra.Command {
3132 Use : "server" ,
3233 Short : "Start the Code extension marketplace" ,
34+ Example : strings .Join ([]string {
35+ " marketplace server --extensions-dir ./extensions" ,
36+ }, "\n " ),
3337 RunE : func (cmd * cobra.Command , args []string ) error {
3438 ctx , cancel := context .WithCancel (cmd .Context ())
3539 defer cancel ()
You can’t perform that action at this time.
0 commit comments