mirror of
https://github.com/go-shiori/shiori.git
synced 2025-12-09 05:25:53 +08:00
Remove unneeded imports
This commit is contained in:
parent
46c88d5db5
commit
5b33b7f50f
4 changed files with 6 additions and 12 deletions
|
|
@ -2,7 +2,6 @@ package cmd
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
|
@ -35,7 +34,6 @@ var (
|
|||
err := DB.DeleteBookmarks(args...)
|
||||
if err != nil {
|
||||
cError.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package cmd
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/RadhiFadlillah/shiori/model"
|
||||
|
|
@ -26,7 +25,7 @@ var (
|
|||
bookmarks, err := DB.GetBookmarks(false, args...)
|
||||
if err != nil {
|
||||
cError.Println(err)
|
||||
os.Exit(1)
|
||||
return
|
||||
}
|
||||
|
||||
if len(bookmarks) == 0 {
|
||||
|
|
@ -36,7 +35,7 @@ var (
|
|||
cError.Println("No bookmarks saved yet")
|
||||
}
|
||||
|
||||
os.Exit(1)
|
||||
return
|
||||
}
|
||||
|
||||
// Print data
|
||||
|
|
@ -44,7 +43,7 @@ var (
|
|||
bt, err := json.MarshalIndent(&bookmarks, "", " ")
|
||||
if err != nil {
|
||||
cError.Println(err)
|
||||
os.Exit(1)
|
||||
return
|
||||
}
|
||||
fmt.Println(string(bt))
|
||||
} else if indexOnly {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package cmd
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/RadhiFadlillah/shiori/database"
|
||||
"github.com/spf13/cobra"
|
||||
|
|
@ -23,6 +22,5 @@ var (
|
|||
func Execute() {
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package cmd
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
|
@ -34,12 +33,12 @@ var (
|
|||
bookmarks, err := DB.SearchBookmarks(false, keyword, tags...)
|
||||
if err != nil {
|
||||
cError.Println(err)
|
||||
os.Exit(1)
|
||||
return
|
||||
}
|
||||
|
||||
if len(bookmarks) == 0 {
|
||||
cError.Println("No matching bookmarks found")
|
||||
os.Exit(1)
|
||||
return
|
||||
}
|
||||
|
||||
// Print data
|
||||
|
|
@ -47,7 +46,7 @@ var (
|
|||
bt, err := json.MarshalIndent(&bookmarks, "", " ")
|
||||
if err != nil {
|
||||
cError.Println(err)
|
||||
os.Exit(1)
|
||||
return
|
||||
}
|
||||
fmt.Println(string(bt))
|
||||
} else if indexOnly {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue