mirror of
https://github.com/go-shiori/shiori.git
synced 2025-09-28 07:44:45 +08:00
Change module path to relative, add check for empty tag on import
This commit is contained in:
parent
837c470176
commit
222ff0371e
10 changed files with 15 additions and 13 deletions
|
@ -5,8 +5,8 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"../model"
|
||||
"github.com/RadhiFadlillah/go-readability"
|
||||
"github.com/RadhiFadlillah/shiori/model"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/RadhiFadlillah/shiori/model"
|
||||
"../model"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/RadhiFadlillah/shiori/model"
|
||||
"../model"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/RadhiFadlillah/shiori/database"
|
||||
"../database"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"../model"
|
||||
"github.com/RadhiFadlillah/go-readability"
|
||||
"github.com/RadhiFadlillah/shiori/model"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package database
|
|||
import (
|
||||
"database/sql"
|
||||
|
||||
"github.com/RadhiFadlillah/shiori/model"
|
||||
"../model"
|
||||
)
|
||||
|
||||
// Database is interface for manipulating data in database.
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/RadhiFadlillah/shiori/model"
|
||||
"../model"
|
||||
"github.com/jmoiron/sqlx"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
|
4
main.go
4
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"
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue