Skip to content

Commit

Permalink
Fixing go.mod v2 version (#46)
Browse files Browse the repository at this point in the history
* fixing go mod version

* update README with correct import
  • Loading branch information
emarj authored Feb 3, 2023
1 parent 445acc2 commit e5bd08a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
Scan standard lib database rows directly to structs or slices.
For the most comprehensive and up-to-date docs see the [godoc](https://godoc.org/github.com/blockloop/scan)

```go
import "github.com/blockloop/scan/v2"
```

## Examples

### Multiple Rows
Expand Down
2 changes: 1 addition & 1 deletion bench_scanner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package scan_test
import (
"testing"

"github.com/blockloop/scan"
"github.com/blockloop/scan/v2"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion example_scanner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"math/rand"
"os"

"github.com/blockloop/scan"
"github.com/blockloop/scan/v2"
_ "github.com/proullon/ramsql/driver"
)

Expand Down
2 changes: 1 addition & 1 deletion examples_values_columns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package scan_test
import (
"fmt"

"github.com/blockloop/scan"
"github.com/blockloop/scan/v2"
)

func ExampleValues() {
Expand Down
2 changes: 1 addition & 1 deletion fakes_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/blockloop/scan
module github.com/blockloop/scan/v2

go 1.17

Expand Down
3 changes: 2 additions & 1 deletion scanner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"sync/atomic"
"testing"

"github.com/blockloop/scan"
"github.com/blockloop/scan/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down Expand Up @@ -311,6 +311,7 @@ func TestRowStrictScansNestedFields(t *testing.T) {
assert.Equal(t, "Brett", res.Item.First)
assert.Equal(t, "Jones", res.Item.Last)
}

func TestRowsStrictIgnoresFieldsWithoutDBTag(t *testing.T) {
rows := fakeRowsWithRecords(t, []string{"First", "Last"},
[]interface{}{"Brett", "Jones"},
Expand Down

0 comments on commit e5bd08a

Please sign in to comment.