This repository was archived by the owner on Sep 9, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,28 @@ func main() {
40
40
& hashinCommand {},
41
41
}
42
42
43
+ examples := [][2 ]string {
44
+ {
45
+ "dep init" ,
46
+ "set up a new project" ,
47
+ },
48
+ {
49
+ "dep ensure" ,
50
+ "install the project's dependencies" ,
51
+ },
52
+ {
53
+ "dep ensure -update" ,
54
+ "update the locked versions of all dependencies" ,
55
+ },
56
+ {
57
+ "dep ensure github.com/pkg/errors" ,
58
+ "add a dependency to the project" ,
59
+ },
60
+ }
61
+
43
62
usage := func () {
63
+ fmt .Fprintln (os .Stderr , "dep is a tool for managing dependencies for Go projects" )
64
+ fmt .Fprintln (os .Stderr )
44
65
fmt .Fprintln (os .Stderr , "Usage: dep <command>" )
45
66
fmt .Fprintln (os .Stderr )
46
67
fmt .Fprintln (os .Stderr , "Commands:" )
@@ -53,6 +74,12 @@ func main() {
53
74
}
54
75
w .Flush ()
55
76
fmt .Fprintln (os .Stderr )
77
+ fmt .Fprintln (os .Stderr , "Examples:" )
78
+ for _ , example := range examples {
79
+ fmt .Fprintf (w , "\t %s\t %s\n " , example [0 ], example [1 ])
80
+ }
81
+ w .Flush ()
82
+ fmt .Fprintln (os .Stderr )
56
83
fmt .Fprintln (os .Stderr , "Use \" dep help [command]\" for more information about a command." )
57
84
}
58
85
You can’t perform that action at this time.
0 commit comments