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() {
|
||||
rootCmd.AddCommand(importCmd)
|
||||
|
||||
importCmd.Flags().String("old.db", "", "")
|
||||
importCmd.Flags().String("old.database", "", "")
|
||||
importCmd.Flags().String("old.config", "", "")
|
||||
importCmd.MarkFlagRequired("old.database")
|
||||
}
|
||||
|
||||
var importCmd = &cobra.Command{
|
||||
Use: "import",
|
||||
Short: "Imports an old configuration.",
|
||||
Long: `Imports an old configuration`,
|
||||
Short: "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,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
oldDB := mustGetString(cmd, "old.db")
|
||||
oldDB := mustGetString(cmd, "old.database")
|
||||
oldConf := mustGetString(cmd, "old.config")
|
||||
|
||||
err := importer.Import(oldDB, oldConf, databasePath)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user