refactor dependencies

This commit is contained in:
blob42 2023-10-10 13:10:27 +02:00
parent 1c82319b1f
commit fbf9921999
5 changed files with 12 additions and 11 deletions

View File

@ -19,7 +19,7 @@
// You should have received a copy of the GNU Affero General Public License along with
// gosuki. If not, see <http://www.gnu.org/licenses/>.
package bookmarks
package gosuki
// Bookmark type
type Bookmark struct {

View File

@ -30,9 +30,9 @@ import (
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"github.com/blob42/gosuki"
"github.com/blob42/gosuki/internal/database"
"github.com/blob42/gosuki/internal/logging"
"github.com/blob42/gosuki/pkg/bookmarks"
"github.com/blob42/gosuki/pkg/manager"
)
@ -40,7 +40,7 @@ type ApiServer struct {
http.Handler
}
type Bookmark = bookmarks.Bookmark
type Bookmark = gosuki.Bookmark
var log = logging.GetLogger("API")

View File

@ -24,15 +24,14 @@ package database
import (
"strings"
"github.com/blob42/gosuki/pkg/bookmarks"
"github.com/blob42/gosuki"
sqlite3 "github.com/mattn/go-sqlite3"
)
// Default separator used to join tags in the DB
const TagSep = ","
type Bookmark = bookmarks.Bookmark
type Bookmark = gosuki.Bookmark
func cleanup(f func() error) {
if err := f(); err != nil {

View File

@ -24,11 +24,12 @@ package tree
import (
"fmt"
"github.com/blob42/gosuki/pkg/bookmarks"
"github.com/kr/pretty"
"github.com/blob42/gosuki"
"github.com/blob42/gosuki/internal/index"
"github.com/blob42/gosuki/internal/logging"
"github.com/blob42/gosuki/internal/utils"
"github.com/kr/pretty"
"github.com/xlab/treeprint"
)
@ -261,13 +262,13 @@ func (node *Node) getTags() []string {
return node.Tags
}
func (node *Node) GetBookmark() *bookmarks.Bookmark {
func (node *Node) GetBookmark() *gosuki.Bookmark {
if node.Type != URLNode {
return nil
}
return &bookmarks.Bookmark{
return &gosuki.Bookmark{
URL: node.URL,
Metadata: node.Name,
Desc: node.Desc,

View File

@ -24,8 +24,9 @@ package watch
import (
"time"
"github.com/blob42/gosuki/pkg/manager"
"github.com/blob42/gosuki"
"github.com/blob42/gosuki/internal/logging"
"github.com/blob42/gosuki/pkg/manager"
"github.com/fsnotify/fsnotify"
)