@@ -9,25 +9,25 @@ import (
99 "io/ioutil"
1010 "encoding/json"
1111)
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` ,
1616 Run : func (cmd * cobra.Command , args []string ) {
17- path (nwoFlag , languageFlag )
17+ info (nwoFlag , languageFlag )
1818 },
1919 }
2020
2121func 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" )
2828}
2929
30- func path (nwo string , language string ) {
30+ func info (nwo string , language string ) {
3131 dir := filepath .Join (utils .GetPath (nwo ), language )
3232 files , err := ioutil .ReadDir (dir )
3333 if err != nil {
0 commit comments