summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/flyscrape/new.go2
-rw-r--r--cmd/flyscrape/run.go2
-rw-r--r--cmd/flyscrape/watch.go3
-rw-r--r--fetch_test.go3
-rw-r--r--go.mod2
-rw-r--r--js.go8
-rw-r--r--js_test.go3
-rw-r--r--scrape_test.go3
-rw-r--r--watch_test.go3
9 files changed, 9 insertions, 20 deletions
diff --git a/cmd/flyscrape/new.go b/cmd/flyscrape/new.go
index c6b2d34..ce666ce 100644
--- a/cmd/flyscrape/new.go
+++ b/cmd/flyscrape/new.go
@@ -9,7 +9,7 @@ import (
"fmt"
"os"
- "flyscrape/js"
+ "github.com/philippta/flyscrape/js"
)
type NewCommand struct{}
diff --git a/cmd/flyscrape/run.go b/cmd/flyscrape/run.go
index 8e83ca8..987d0e0 100644
--- a/cmd/flyscrape/run.go
+++ b/cmd/flyscrape/run.go
@@ -11,7 +11,7 @@ import (
"os"
"time"
- "flyscrape"
+ "github.com/philippta/flyscrape"
)
type RunCommand struct{}
diff --git a/cmd/flyscrape/watch.go b/cmd/flyscrape/watch.go
index 777ae8a..b8e3c37 100644
--- a/cmd/flyscrape/watch.go
+++ b/cmd/flyscrape/watch.go
@@ -9,9 +9,8 @@ import (
"fmt"
"log"
- "flyscrape"
-
"github.com/inancgumus/screen"
+ "github.com/philippta/flyscrape"
)
type WatchCommand struct{}
diff --git a/fetch_test.go b/fetch_test.go
index 5ee0222..041ade2 100644
--- a/fetch_test.go
+++ b/fetch_test.go
@@ -5,8 +5,7 @@ import (
"net/http/httptest"
"testing"
- "flyscrape"
-
+ "github.com/philippta/flyscrape"
"github.com/stretchr/testify/require"
)
diff --git a/go.mod b/go.mod
index d1d7ff8..cf7a7a5 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module flyscrape
+module github.com/philippta/flyscrape
go 1.20
diff --git a/js.go b/js.go
index 1a2630c..5a20ed7 100644
--- a/js.go
+++ b/js.go
@@ -10,11 +10,9 @@ import (
"fmt"
"math/rand"
"strings"
- "time"
-
- "flyscrape/js"
"github.com/evanw/esbuild/pkg/api"
+ "github.com/philippta/flyscrape/js"
v8 "rogchap.com/v8go"
)
@@ -28,10 +26,6 @@ func (err TransformError) Error() string {
return fmt.Sprintf("%d:%d: %s", err.Line, err.Column, err.Text)
}
-func init() {
- rand.Seed(time.Now().UnixNano())
-}
-
func Compile(src string) (ScrapeOptions, ScrapeFunc, error) {
src, err := build(src)
if err != nil {
diff --git a/js_test.go b/js_test.go
index 3dd2873..d1010b9 100644
--- a/js_test.go
+++ b/js_test.go
@@ -7,8 +7,7 @@ package flyscrape_test
import (
"testing"
- "flyscrape"
-
+ "github.com/philippta/flyscrape"
"github.com/stretchr/testify/require"
)
diff --git a/scrape_test.go b/scrape_test.go
index c1a32b6..6f7174e 100644
--- a/scrape_test.go
+++ b/scrape_test.go
@@ -10,8 +10,7 @@ import (
"testing"
"time"
- "flyscrape"
-
+ "github.com/philippta/flyscrape"
"github.com/stretchr/testify/require"
)
diff --git a/watch_test.go b/watch_test.go
index c9ee28f..539ad3b 100644
--- a/watch_test.go
+++ b/watch_test.go
@@ -10,8 +10,7 @@ import (
"testing"
"time"
- "flyscrape"
-
+ "github.com/philippta/flyscrape"
"github.com/stretchr/testify/require"
)