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 {
23
23
cmd := & cobra.Command {
24
24
Use : "add <source>" ,
25
25
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 ),
27
31
RunE : func (cmd * cobra.Command , args []string ) error {
28
32
ctx , cancel := context .WithCancel (cmd .Context ())
29
33
defer cancel ()
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package cli
2
2
3
3
import (
4
4
"github.com/spf13/cobra"
5
+ "strings"
5
6
)
6
7
7
8
func Root () * cobra.Command {
@@ -10,7 +11,9 @@ func Root() *cobra.Command {
10
11
SilenceErrors : true ,
11
12
SilenceUsage : true ,
12
13
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 " ),
14
17
}
15
18
16
19
cmd .AddCommand (add (), server (), version ())
Original file line number Diff line number Diff line change 7
7
"net/http"
8
8
"os/signal"
9
9
"path/filepath"
10
+ "strings"
10
11
"time"
11
12
12
13
"github.com/spf13/cobra"
@@ -30,6 +31,9 @@ func server() *cobra.Command {
30
31
cmd := & cobra.Command {
31
32
Use : "server" ,
32
33
Short : "Start the Code extension marketplace" ,
34
+ Example : strings .Join ([]string {
35
+ " marketplace server --extensions-dir ./extensions" ,
36
+ }, "\n " ),
33
37
RunE : func (cmd * cobra.Command , args []string ) error {
34
38
ctx , cancel := context .WithCancel (cmd .Context ())
35
39
defer cancel ()
You can’t perform that action at this time.
0 commit comments