Skip to content

Commit

Permalink
Fixed name in go.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
cavaliercoder committed Jan 8, 2022
1 parent 5cc128d commit 3c0c4ad
Show file tree
Hide file tree
Showing 33 changed files with 22 additions and 42 deletions.
7 changes: 0 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ go:
- 1.16.x
- 1.15.x
- 1.14.x
- 1.13.x
- 1.12.x
- 1.11.x
- 1.10.x
- 1.9.x
- 1.8.x
- 1.7.x

script: make check

Expand Down
24 changes: 6 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
GO = go
GOGET = $(GO) get -u

all: check lint
all: check

check:
$(GO) test -v -cover -race ./...
cd cmd/grab && $(MAKE) -B all
cd v3 && $(GO) test -v -cover -race ./...
cd v3/cmd/grab && $(MAKE) -B all

install:
$(GO) install -v ./...
cd v3/cmd/grab && $(MAKE) install

clean:
$(GO) clean -x ./...
cd v3 && $(GO) clean -x ./...
rm -rvf ./.test*

lint:
gofmt -l -e -s . || :
go vet . || :
golint . || :
gocyclo -over 15 . || :
misspell ./* || :

deps:
$(GOGET) github.com/golang/lint/golint
$(GOGET) github.com/fzipp/gocyclo
$(GOGET) github.com/client9/misspell/cmd/misspell

.PHONY: all check install clean lint deps
.PHONY: all check install clean
3 changes: 0 additions & 3 deletions go.mod

This file was deleted.

File renamed without changes.
13 changes: 6 additions & 7 deletions client_test.go → v3/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"testing"
"time"

"github.com/cavaliercoder/grab/pkg/grabtest"
"github.com/cavaliergopher/grab/v3/pkg/grabtest"
)

// TestFilenameResolutions tests that the destination filename for Requests can
Expand Down Expand Up @@ -205,7 +205,7 @@ func TestContentLength(t *testing.T) {
func TestAutoResume(t *testing.T) {
segs := 8
size := 1048576
sum := grabtest.DefaultHandlerSHA256ChecksumBytes //grabtest.MustHexDecodeString("fbbab289f7f94b25736c58be46a994c441fd02552cc6022352e3d86d2fab7c83")
sum := grabtest.DefaultHandlerSHA256ChecksumBytes //grab/v3test.MustHexDecodeString("fbbab289f7f94b25736c58be46a994c441fd02552cc6022352e3d86d2fab7c83")
filename := ".testAutoResume"

defer os.Remove(filename)
Expand Down Expand Up @@ -293,7 +293,7 @@ func TestAutoResume(t *testing.T) {
})

t.Run("WithNoContentLengthHeaderAndChecksumFailure", func(t *testing.T) {
// ref: https://github.com/cavaliercoder/grab/pull/27
// ref: https://github.com/cavaliergopher/grab/v3/pull/27
size := size * 2
grabtest.WithTestServer(t, func(url string) {
req := mustNewRequest(filename, url)
Expand Down Expand Up @@ -474,7 +474,6 @@ func TestCancelHangingResponse(t *testing.T) {
if resp.BytesComplete() == int64(fileSize) {
t.Error("download was not supposed to be complete")
}
fmt.Println("bye")
},
grabtest.RateLimiter(1),
grabtest.ContentLength(fileSize),
Expand Down Expand Up @@ -723,7 +722,7 @@ func TestAfterCopyHook(t *testing.T) {
}

func TestIssue37(t *testing.T) {
// ref: https://github.com/cavaliercoder/grab/issues/37
// ref: https://github.com/cavaliergopher/grab/v3/issues/37
filename := "./.testIssue37"
largeSize := int64(2097152)
smallSize := int64(1048576)
Expand Down Expand Up @@ -764,7 +763,7 @@ func TestIssue37(t *testing.T) {
// TestHeadBadStatus validates that HEAD requests that return non-200 can be
// ignored and succeed if the GET requests succeeeds.
//
// Fixes: https://github.com/cavaliercoder/grab/issues/43
// Fixes: https://github.com/cavaliergopher/grab/v3/issues/43
func TestHeadBadStatus(t *testing.T) {
expect := http.StatusOK
filename := ".testIssue43"
Expand Down Expand Up @@ -796,7 +795,7 @@ func TestHeadBadStatus(t *testing.T) {
// TestAutoResume also covers cases with checksum validation.
//
// Kudos to Setnička Jiří <[email protected]> for identifying and raising
// a solution to this issue. Ref: https://github.com/cavaliercoder/grab/pull/27
// a solution to this issue. Ref: https://github.com/cavaliergopher/grab/v3/pull/27
func TestMissingContentLength(t *testing.T) {
// expectSize must be sufficiently large that DefaultClient.Do won't prefetch
// the entire body and compute ContentLength before returning a Response.
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion cmd/grab/main.go → v3/cmd/grab/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

"github.com/cavaliercoder/grab/pkg/grabui"
"github.com/cavaliergopher/grab/v3/pkg/grabui"
)

func main() {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions v3/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/cavaliergopher/grab/v3

go 1.14
File renamed without changes.
2 changes: 1 addition & 1 deletion grab_test.go → v3/grab_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"testing"

"github.com/cavaliercoder/grab/pkg/grabtest"
"github.com/cavaliergopher/grab/v3/pkg/grabtest"
)

func TestMain(m *testing.M) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sync"
"time"

"github.com/cavaliercoder/grab"
"github.com/cavaliergopher/grab/v3"
)

type ConsoleClient struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/grabui/grabui.go → v3/pkg/grabui/grabui.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package grabui
import (
"context"

"github.com/cavaliercoder/grab"
"github.com/cavaliergopher/grab/v3"
)

func GetBatch(
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion rate_limiter_test.go → v3/rate_limiter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/cavaliercoder/grab/pkg/grabtest"
"github.com/cavaliergopher/grab/v3/pkg/grabtest"
)

// testRateLimiter is a naive rate limiter that limits throughput to r tokens
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion response_test.go → v3/response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/cavaliercoder/grab/pkg/grabtest"
"github.com/cavaliergopher/grab/v3/pkg/grabtest"
)

// testComplete validates that a completed Response has all the desired fields.
Expand Down
2 changes: 1 addition & 1 deletion transfer.go → v3/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync/atomic"
"time"

"github.com/cavaliercoder/grab/pkg/bps"
"github.com/cavaliergopher/grab/v3/pkg/bps"
)

type transfer struct {
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 3c0c4ad

Please sign in to comment.