wip migrate to module
This commit is contained in:
parent
5898acc8f0
commit
dc795166c3
5
api.go
5
api.go
@ -1,13 +1,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"gomark/bookmarks"
|
||||
"gomark/database"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"git.sp4ke.com/sp4ke/gomark/bookmarks"
|
||||
"git.sp4ke.com/sp4ke/gomark/database"
|
||||
|
||||
"git.sp4ke.com/sp4ke/gum"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
@ -10,17 +10,18 @@ package browsers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"gomark/database"
|
||||
"gomark/index"
|
||||
"gomark/logging"
|
||||
"gomark/parsing"
|
||||
"gomark/tree"
|
||||
"gomark/watch"
|
||||
"io"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
|
||||
"git.sp4ke.com/sp4ke/gomark/database"
|
||||
"git.sp4ke.com/sp4ke/gomark/index"
|
||||
"git.sp4ke.com/sp4ke/gomark/logging"
|
||||
"git.sp4ke.com/sp4ke/gomark/parsing"
|
||||
"git.sp4ke.com/sp4ke/gomark/tree"
|
||||
"git.sp4ke.com/sp4ke/gomark/watch"
|
||||
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"github.com/sp4ke/hashmap"
|
||||
)
|
||||
|
15
chrome.go
15
chrome.go
@ -1,17 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"gomark/browsers"
|
||||
"gomark/chrome"
|
||||
"gomark/database"
|
||||
"gomark/parsing"
|
||||
"gomark/tree"
|
||||
"gomark/utils"
|
||||
"gomark/watch"
|
||||
"io/ioutil"
|
||||
"path"
|
||||
"time"
|
||||
|
||||
"git.sp4ke.com/sp4ke/gomark/browsers"
|
||||
"git.sp4ke.com/sp4ke/gomark/chrome"
|
||||
"git.sp4ke.com/sp4ke/gomark/database"
|
||||
"git.sp4ke.com/sp4ke/gomark/parsing"
|
||||
"git.sp4ke.com/sp4ke/gomark/tree"
|
||||
"git.sp4ke.com/sp4ke/gomark/utils"
|
||||
"git.sp4ke.com/sp4ke/gomark/watch"
|
||||
|
||||
"github.com/OneOfOne/xxhash"
|
||||
"github.com/buger/jsonparser"
|
||||
"github.com/fsnotify/fsnotify"
|
||||
|
@ -1,11 +1,11 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"gomark/config"
|
||||
"gomark/logging"
|
||||
"gomark/utils"
|
||||
"git.sp4ke.com/sp4ke/gomark/config"
|
||||
"git.sp4ke.com/sp4ke/gomark/logging"
|
||||
"git.sp4ke.com/sp4ke/gomark/utils"
|
||||
|
||||
cli "gopkg.in/urfave/cli.v1"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
var log = logging.GetLogger("CMD")
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"gomark/mozilla"
|
||||
"path/filepath"
|
||||
|
||||
cli "gopkg.in/urfave/cli.v1"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
var fflog = logging.GetLogger("FF")
|
||||
|
@ -1,12 +1,13 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"gomark/config"
|
||||
"gomark/mozilla"
|
||||
"strings"
|
||||
|
||||
"git.sp4ke.com/sp4ke/gomark/config"
|
||||
"git.sp4ke.com/sp4ke/gomark/mozilla"
|
||||
|
||||
"github.com/gobuffalo/flect"
|
||||
cli "gopkg.in/urfave/cli.v1"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -14,7 +15,7 @@ const (
|
||||
)
|
||||
|
||||
var FirefoxGlobalFlags = []cli.Flag{
|
||||
cli.StringFlag{
|
||||
&cli.StringFlag{
|
||||
Name: FirefoxDefaultProfileFlag,
|
||||
Usage: "Set the default firefox `PROFILE` to use",
|
||||
},
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
|
||||
"git.sp4ke.com/sp4ke/gum"
|
||||
|
||||
cli "gopkg.in/urfave/cli.v1"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
var startServerCmd = cli.Command{
|
||||
|
@ -1,8 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"gomark/config"
|
||||
"gomark/utils"
|
||||
"git.sp4ke.com/sp4ke/gomark/config"
|
||||
"git.sp4ke.com/sp4ke/gomark/utils"
|
||||
)
|
||||
|
||||
func InitDefaultConfig() {
|
||||
|
@ -1,8 +1,9 @@
|
||||
package database
|
||||
|
||||
import (
|
||||
"gomark/utils"
|
||||
"path/filepath"
|
||||
|
||||
"git.sp4ke.com/sp4ke/gomark/utils"
|
||||
)
|
||||
|
||||
func GetDBFullPath() string {
|
||||
|
5
db.go
5
db.go
@ -1,9 +1,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"gomark/database"
|
||||
"gomark/utils"
|
||||
"path/filepath"
|
||||
|
||||
"git.sp4ke.com/sp4ke/gomark/database"
|
||||
"git.sp4ke.com/sp4ke/gomark/utils"
|
||||
)
|
||||
|
||||
type DB = database.DB
|
||||
|
15
firefox.go
15
firefox.go
@ -6,17 +6,18 @@ import (
|
||||
"database/sql"
|
||||
"errors"
|
||||
"fmt"
|
||||
"gomark/browsers"
|
||||
"gomark/database"
|
||||
"gomark/mozilla"
|
||||
"gomark/parsing"
|
||||
"gomark/tree"
|
||||
"gomark/utils"
|
||||
"gomark/watch"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"git.sp4ke.com/sp4ke/gomark/browsers"
|
||||
"git.sp4ke.com/sp4ke/gomark/database"
|
||||
"git.sp4ke.com/sp4ke/gomark/mozilla"
|
||||
"git.sp4ke.com/sp4ke/gomark/parsing"
|
||||
"git.sp4ke.com/sp4ke/gomark/tree"
|
||||
"git.sp4ke.com/sp4ke/gomark/utils"
|
||||
"git.sp4ke.com/sp4ke/gomark/watch"
|
||||
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"github.com/jmoiron/sqlx"
|
||||
sqlite3 "github.com/mattn/go-sqlite3"
|
||||
|
2
log.go
2
log.go
@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"gomark/logging"
|
||||
"git.sp4ke.com/sp4ke/gomark/logging"
|
||||
)
|
||||
|
||||
var (
|
||||
|
14
main.go
14
main.go
@ -6,12 +6,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"gomark/cmd"
|
||||
"gomark/config"
|
||||
"os"
|
||||
|
||||
"git.sp4ke.com/sp4ke/gomark/config"
|
||||
|
||||
"git.sp4ke.com/sp4ke/gomark/cmd"
|
||||
|
||||
"github.com/urfave/cli/altsrc"
|
||||
cli "gopkg.in/urfave/cli.v1"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -19,12 +21,12 @@ func main() {
|
||||
app.Name = "gomark"
|
||||
app.Version = "1.0"
|
||||
|
||||
flags := []cli.Flag{
|
||||
altsrc.NewStringFlag(cli.StringFlag{
|
||||
flags := []*cli.Flag{
|
||||
&altsrc.NewStringFlag(cli.StringFlag{
|
||||
Name: "firefox.DefaultProfile",
|
||||
}),
|
||||
|
||||
cli.StringFlag{
|
||||
&cli.StringFlag{
|
||||
Name: "config-file",
|
||||
Value: config.ConfigFile,
|
||||
Usage: "TOML config `FILE` path",
|
||||
|
@ -1,8 +1,8 @@
|
||||
package mozilla
|
||||
|
||||
import (
|
||||
"gomark/database"
|
||||
"gomark/logging"
|
||||
"git.sp4ke.com/sp4ke/gomark/database"
|
||||
"git.sp4ke.com/sp4ke/gomark/logging"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -2,8 +2,9 @@ package mozilla
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"gomark/config"
|
||||
"gomark/database"
|
||||
|
||||
"git.sp4ke.com/sp4ke/gomark/config"
|
||||
"git.sp4ke.com/sp4ke/gomark/database"
|
||||
|
||||
"github.com/fatih/structs"
|
||||
"github.com/mitchellh/mapstructure"
|
||||
|
@ -3,13 +3,14 @@ package mozilla
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"gomark/config"
|
||||
"gomark/profiles"
|
||||
"gomark/utils"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
|
||||
"git.sp4ke.com/sp4ke/gomark/config"
|
||||
"git.sp4ke.com/sp4ke/gomark/profiles"
|
||||
"git.sp4ke.com/sp4ke/gomark/utils"
|
||||
|
||||
ini "gopkg.in/ini.v1"
|
||||
)
|
||||
|
||||
|
@ -3,8 +3,9 @@ package mozilla
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"gomark/utils"
|
||||
"path"
|
||||
|
||||
"git.sp4ke.com/sp4ke/gomark/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -2,9 +2,10 @@ package tree
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"gomark/bookmarks"
|
||||
"gomark/index"
|
||||
"gomark/logging"
|
||||
|
||||
"git.sp4ke.com/sp4ke/gomark/bookmarks"
|
||||
"git.sp4ke.com/sp4ke/gomark/index"
|
||||
"git.sp4ke.com/sp4ke/gomark/logging"
|
||||
|
||||
"github.com/xlab/treeprint"
|
||||
)
|
||||
|
@ -1,10 +1,11 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"gomark/logging"
|
||||
"gomark/watch"
|
||||
"time"
|
||||
|
||||
"git.sp4ke.com/sp4ke/gomark/logging"
|
||||
"git.sp4ke.com/sp4ke/gomark/watch"
|
||||
|
||||
"github.com/fsnotify/fsnotify"
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user