Skip to content

Commit 32da7d3

Browse files
author
Alvaro Muñoz
committed
rename path command to info
1 parent a87b09a commit 32da7d3

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

cmd/path.go renamed to cmd/info.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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

2121
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")
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

Comments
 (0)