@@ -9,25 +9,25 @@ import (
9
9
"io/ioutil"
10
10
"encoding/json"
11
11
)
12
- var pathCmd = & cobra.Command {
13
- Use : "path " ,
14
- Short : "Returns the path to a database stored in the QLDB structure" ,
15
- Long : `Returns the path to a database stored in the QLDB structure` ,
12
+ var infoCmd = & cobra.Command {
13
+ Use : "info " ,
14
+ Short : "Returns information for a database stored in the QLDB structure" ,
15
+ Long : `Returns information for a database stored in the QLDB structure` ,
16
16
Run : func (cmd * cobra.Command , args []string ) {
17
- path (nwoFlag , languageFlag )
17
+ info (nwoFlag , languageFlag )
18
18
},
19
19
}
20
20
21
21
func init () {
22
- rootCmd .AddCommand (pathCmd )
23
- pathCmd .Flags ().StringVarP (& nwoFlag , "nwo" , "n" , "" , "The NWO of the repository to get the database for." )
24
- pathCmd .Flags ().StringVarP (& languageFlag , "language" , "l" , "" , "The primary language you want the database for." )
25
- pathCmd .Flags ().BoolVarP (& jsonFlag , "json" , "j" , false , "Use json as the output format." )
26
- pathCmd .MarkFlagRequired ("nwo" )
27
- pathCmd .MarkFlagRequired ("language" )
22
+ rootCmd .AddCommand (infoCmd )
23
+ infoCmd .Flags ().StringVarP (& nwoFlag , "nwo" , "n" , "" , "The NWO of the repository to get the database for." )
24
+ infoCmd .Flags ().StringVarP (& languageFlag , "language" , "l" , "" , "The primary language you want the database for." )
25
+ infoCmd .Flags ().BoolVarP (& jsonFlag , "json" , "j" , false , "Use json as the output format." )
26
+ infoCmd .MarkFlagRequired ("nwo" )
27
+ infoCmd .MarkFlagRequired ("language" )
28
28
}
29
29
30
- func path (nwo string , language string ) {
30
+ func info (nwo string , language string ) {
31
31
dir := filepath .Join (utils .GetPath (nwo ), language )
32
32
files , err := ioutil .ReadDir (dir )
33
33
if err != nil {
0 commit comments