diff --git a/cmd/add.go b/cmd/add.go index 94735e53..e1394667 100644 --- a/cmd/add.go +++ b/cmd/add.go @@ -5,8 +5,8 @@ import ( "strings" "time" + "../model" "github.com/RadhiFadlillah/go-readability" - "github.com/RadhiFadlillah/shiori/model" "github.com/spf13/cobra" ) diff --git a/cmd/export.go b/cmd/export.go index 050da8fa..1fe72555 100644 --- a/cmd/export.go +++ b/cmd/export.go @@ -7,7 +7,7 @@ import ( "strings" "time" - "github.com/RadhiFadlillah/shiori/model" + "../model" "github.com/spf13/cobra" ) diff --git a/cmd/import.go b/cmd/import.go index 4f38cb13..6775ec2b 100644 --- a/cmd/import.go +++ b/cmd/import.go @@ -7,8 +7,8 @@ import ( "strings" "time" + "../model" "github.com/PuerkitoBio/goquery" - "github.com/RadhiFadlillah/shiori/model" "github.com/spf13/cobra" ) @@ -73,7 +73,9 @@ func importBookmarks(pth string, generateTag bool) error { // Get bookmark tags tags := []model.Tag{} for _, strTag := range strings.Split(strTags, ",") { - tags = append(tags, model.Tag{Name: strTag}) + if strTag != "" { + tags = append(tags, model.Tag{Name: strTag}) + } } // Get bookmark excerpt diff --git a/cmd/print.go b/cmd/print.go index 407e396c..725498cd 100644 --- a/cmd/print.go +++ b/cmd/print.go @@ -6,7 +6,7 @@ import ( "os" "strings" - "github.com/RadhiFadlillah/shiori/model" + "../model" "github.com/spf13/cobra" ) diff --git a/cmd/root.go b/cmd/root.go index 51121593..b6e502dc 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/RadhiFadlillah/shiori/database" + "../database" "github.com/spf13/cobra" ) diff --git a/cmd/serve.go b/cmd/serve.go index e321dbbe..198d5fd5 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -13,8 +13,8 @@ import ( "strings" "time" - "github.com/RadhiFadlillah/shiori/assets" - "github.com/RadhiFadlillah/shiori/model" + "../assets" + "../model" "github.com/dgrijalva/jwt-go" "github.com/dgrijalva/jwt-go/request" "github.com/julienschmidt/httprouter" diff --git a/cmd/update.go b/cmd/update.go index 3dbf5702..b3f74a8b 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -8,8 +8,8 @@ import ( "sync" "time" + "../model" "github.com/RadhiFadlillah/go-readability" - "github.com/RadhiFadlillah/shiori/model" "github.com/spf13/cobra" ) diff --git a/database/database.go b/database/database.go index 4722f229..14c720b6 100644 --- a/database/database.go +++ b/database/database.go @@ -3,7 +3,7 @@ package database import ( "database/sql" - "github.com/RadhiFadlillah/shiori/model" + "../model" ) // Database is interface for manipulating data in database. diff --git a/database/sqlite.go b/database/sqlite.go index b8bc89b5..bf348e43 100644 --- a/database/sqlite.go +++ b/database/sqlite.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/RadhiFadlillah/shiori/model" + "../model" "github.com/jmoiron/sqlx" "golang.org/x/crypto/bcrypt" ) diff --git a/main.go b/main.go index c44a6aad..324669ac 100644 --- a/main.go +++ b/main.go @@ -2,8 +2,8 @@ package main import ( - "github.com/RadhiFadlillah/shiori/cmd" - db "github.com/RadhiFadlillah/shiori/database" + "./cmd" + db "./database" _ "github.com/mattn/go-sqlite3" )