feat: cleanup
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
parent
311321eedf
commit
36a54c86ba
@ -8,17 +8,20 @@ import (
|
|||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(importCmd)
|
rootCmd.AddCommand(importCmd)
|
||||||
|
|
||||||
importCmd.Flags().String("old.db", "", "")
|
importCmd.Flags().String("old.database", "", "")
|
||||||
importCmd.Flags().String("old.config", "", "")
|
importCmd.Flags().String("old.config", "", "")
|
||||||
|
importCmd.MarkFlagRequired("old.database")
|
||||||
}
|
}
|
||||||
|
|
||||||
var importCmd = &cobra.Command{
|
var importCmd = &cobra.Command{
|
||||||
Use: "import",
|
Use: "import",
|
||||||
Short: "Imports an old configuration.",
|
Short: "Imports an old configuration",
|
||||||
Long: `Imports an old configuration`,
|
Long: `Imports an old configuration. This command DOES NOT
|
||||||
|
import share links because they are incompatible with
|
||||||
|
this version.`,
|
||||||
Args: cobra.NoArgs,
|
Args: cobra.NoArgs,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
oldDB := mustGetString(cmd, "old.db")
|
oldDB := mustGetString(cmd, "old.database")
|
||||||
oldConf := mustGetString(cmd, "old.config")
|
oldConf := mustGetString(cmd, "old.config")
|
||||||
|
|
||||||
err := importer.Import(oldDB, oldConf, databasePath)
|
err := importer.Import(oldDB, oldConf, databasePath)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user