2018-01-28 14:55:43 +08:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2018-03-02 20:29:26 +08:00
|
|
|
|
2018-01-28 14:55:43 +08:00
|
|
|
"github.com/RadhiFadlillah/shiori/database"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2018-02-03 21:20:10 +08:00
|
|
|
// DB is database that used by this cli
|
2018-01-28 14:55:43 +08:00
|
|
|
DB database.Database
|
|
|
|
|
|
|
|
rootCmd = &cobra.Command{
|
|
|
|
Use: "shiori",
|
2018-03-02 20:29:26 +08:00
|
|
|
Short: "Simple command-line bookmark manager built with Go",
|
2018-01-28 14:55:43 +08:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
// Execute adds all child commands to the root command and sets flags appropriately.
|
|
|
|
// This is called by main.main(). It only needs to happen once to the rootCmd.
|
|
|
|
func Execute() {
|
|
|
|
if err := rootCmd.Execute(); err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
}
|
|
|
|
}
|