Repository: tsenart/vegeta
Pull request #501 (2020-03-09 13:16:57)

fix: fix module import path for Go module
#### Background

https://github.com/tsenart/vegeta/issues/497

#### Checklist

- [x] Git commit messages conform to [community standards](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
- [x] Each Git commit represents meaningful milestones or atomic units of work.
- [x] Changed or added code is covered by appropriate tests.



Patch:
diff --git a/README.md b/README.md
index cdedf5f..88f58a3 100644
--- a/README.md
+++ b/README.md
@@ -762,7 +762,7 @@ import (
   "fmt"
   "time"
 
-  vegeta "github.com/tsenart/vegeta/lib"
+  vegeta "github.com/tsenart/vegeta/v12/lib"
 )
 
 func main() {
diff --git a/attack.go b/attack.go
index 302c8de..58ea54f 100644
--- a/attack.go
+++ b/attack.go
@@ -15,8 +15,8 @@ import (
 	"strings"
 	"time"
 
-	"github.com/tsenart/vegeta/internal/resolver"
-	vegeta "github.com/tsenart/vegeta/lib"
+	"github.com/tsenart/vegeta/v12/internal/resolver"
+	vegeta "github.com/tsenart/vegeta/v12/lib"
 )
 
 func attackCmd() command {
diff --git a/encode.go b/encode.go
index b2becf6..5f70a64 100644
--- a/encode.go
+++ b/encode.go
@@ -8,7 +8,7 @@ import (
 	"os/signal"
 	"strings"
 
-	vegeta "github.com/tsenart/vegeta/lib"
+	vegeta "github.com/tsenart/vegeta/v12/lib"
 )
 
 const (
diff --git a/file.go b/file.go
index 9e547f1..2527288 100644
--- a/file.go
+++ b/file.go
@@ -7,7 +7,7 @@ import (
 	"os"
 	"strings"
 
-	vegeta "github.com/tsenart/vegeta/lib"
+	vegeta "github.com/tsenart/vegeta/v12/lib"
 )
 
 func file(name string, create bool) (*os.File, error) {
diff --git a/flags.go b/flags.go
index b9c2060..6a780d9 100644
--- a/flags.go
+++ b/flags.go
@@ -11,7 +11,7 @@ import (
 	"time"
 
 	"github.com/c2h5oh/datasize"
-	vegeta "github.com/tsenart/vegeta/lib"
+	vegeta "github.com/tsenart/vegeta/v12/lib"
 )
 
 // headers is the http.Header used in each target request
diff --git a/go.mod b/go.mod
index 5ad017a..cf7036e 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/tsenart/vegeta
+module github.com/tsenart/vegeta/v12
 
 go 1.13
 
diff --git a/internal/cmd/jsonschema/main.go b/internal/cmd/jsonschema/main.go
index 22e5603..9d6dac7 100644
--- a/internal/cmd/jsonschema/main.go
+++ b/internal/cmd/jsonschema/main.go
@@ -10,7 +10,7 @@ import (
 
 	"github.com/alecthomas/jsonschema"
 
-	vegeta "github.com/tsenart/vegeta/lib"
+	vegeta "github.com/tsenart/vegeta/v12/lib"
 )
 
 func main() {
diff --git a/lib/plot/assets_gen.go b/lib/plot/assets_gen.go
index 09781ec..0a19bad 100644
--- a/lib/plot/assets_gen.go
+++ b/lib/plot/assets_gen.go
@@ -6,7 +6,7 @@ import (
 	"log"
 
 	"github.com/shurcooL/vfsgen"
-	"github.com/tsenart/vegeta/lib/plot"
+	"github.com/tsenart/vegeta/v12/lib/plot"
 )
 
 func main() {
diff --git a/lib/plot/plot.go b/lib/plot/plot.go
index 749bab4..a4abafb 100644
--- a/lib/plot/plot.go
+++ b/lib/plot/plot.go
@@ -14,8 +14,8 @@ import (
 	"strings"
 	"time"
 
-	vegeta "github.com/tsenart/vegeta/lib"
-	"github.com/tsenart/vegeta/lib/lttb"
+	vegeta "github.com/tsenart/vegeta/v12/lib"
+	"github.com/tsenart/vegeta/v12/lib/lttb"
 )
 
 // An Plot represents an interactive HTML time series
diff --git a/lib/plot/timeseries.go b/lib/plot/timeseries.go
index 19e662e..ecb4903 100644
--- a/lib/plot/timeseries.go
+++ b/lib/plot/timeseries.go
@@ -5,7 +5,7 @@ import (
 	"time"
 
 	tsz "github.com/tsenart/go-tsz"
-	"github.com/tsenart/vegeta/lib/lttb"
+	"github.com/tsenart/vegeta/v12/lib/lttb"
 )
 
 // An in-memory timeSeries of points with high compression of
diff --git a/plot.go b/plot.go
index f0420b7..4325d9e 100644
--- a/plot.go
+++ b/plot.go
@@ -7,8 +7,8 @@ import (
 	"os"
 	"os/signal"
 
-	vegeta "github.com/tsenart/vegeta/lib"
-	"github.com/tsenart/vegeta/lib/plot"
+	vegeta "github.com/tsenart/vegeta/v12/lib"
+	"github.com/tsenart/vegeta/v12/lib/plot"
 )
 
 const plotUsage = `Usage: vegeta plot [options] [<file>...]
diff --git a/report.go b/report.go
index cab8a13..94074b7 100644
--- a/report.go
+++ b/report.go
@@ -9,7 +9,7 @@ import (
 	"strings"
 	"time"
 
-	vegeta "github.com/tsenart/vegeta/lib"
+	vegeta "github.com/tsenart/vegeta/v12/lib"
 )
 
 const reportUsage = `Usage: vegeta report [options] [<file>...]


Test patch:
diff --git a/lib/plot/plot_test.go b/lib/plot/plot_test.go
index 60dcf4a..8ae9d7b 100644
--- a/lib/plot/plot_test.go
+++ b/lib/plot/plot_test.go
@@ -11,8 +11,8 @@ import (
 	"time"
 
 	"github.com/google/go-cmp/cmp"
-	vegeta "github.com/tsenart/vegeta/lib"
-	"github.com/tsenart/vegeta/lib/lttb"
+	vegeta "github.com/tsenart/vegeta/v12/lib"
+	"github.com/tsenart/vegeta/v12/lib/lttb"
 )
 
 var update = flag.Bool("update", false, "Update .golden files")