Use cobra to turn linkctl into a proper cli
Most commands are currently placeholders but version and db init work
This commit is contained in:
27
cmd/linkctl/config.go
Normal file
27
cmd/linkctl/config.go
Normal file
@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func configPreRun(cmd *cobra.Command, args []string) error {
|
||||
return setupDb()
|
||||
}
|
||||
|
||||
func configPostRun(cmd *cobra.Command, args []string) error {
|
||||
return cleanupDb()
|
||||
}
|
||||
|
||||
func configSetHandler(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("Not implemented")
|
||||
}
|
||||
|
||||
func configGetHandler(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("Not implemented")
|
||||
}
|
||||
|
||||
func configListHandler(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("Not implemented")
|
||||
}
|
Reference in New Issue
Block a user