Skip to content

Commit

Permalink
chore: bump package to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
nrwiersma committed Jun 20, 2022
1 parent d53d816 commit 141d02a
Show file tree
Hide file tree
Showing 46 changed files with 56 additions and 56 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A fast Go avro codec
Install with:

```shell
go get github.com/hamba/avro
go get github.com/hamba/avro/v2
```

## Usage
Expand Down Expand Up @@ -136,7 +136,7 @@ Go structs can be generated for you from the schema. The types generated follow
Install the struct generator with:

```shell
go install github.com/hamba/avro/cmd/avrogen@<version>
go install github.com/hamba/avro/v2/cmd/avrogen@<version>
```

Example usage assuming there's a valid schema in `in.avsc`:
Expand Down
2 changes: 1 addition & 1 deletion avro_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package avro_test

import "github.com/hamba/avro"
import "github.com/hamba/avro/v2"

func ConfigTeardown() {
// Reset the caches
Expand Down
2 changes: 1 addition & 1 deletion bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"io/ioutil"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
)

type Superhero struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/avrogen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"path/filepath"
"strings"

"github.com/hamba/avro/gen"
"github.com/hamba/avro/v2/gen"
)

type rawOpts struct {
Expand Down
2 changes: 1 addition & 1 deletion codec_marshaler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion codec_skip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion decoder_array_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion decoder_dynamic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion decoder_enum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion decoder_fixed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"math/big"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion decoder_map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion decoder_native_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion decoder_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion decoder_union_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion encoder_array_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion encoder_enum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion encoder_fixed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"math/big"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion encoder_map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion encoder_native_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion encoder_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion encoder_union_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
4 changes: 2 additions & 2 deletions example_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"log"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
)

func ExampleRegister() {
Expand All @@ -21,5 +21,5 @@ func ExampleRegister() {

fmt.Println(result)

//Output: B
// Output: B
}
4 changes: 2 additions & 2 deletions example_simple_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"log"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
)

var Schema = `{
Expand Down Expand Up @@ -45,6 +45,6 @@ func Example_usage() {

fmt.Printf("%+v\n", out)

//Output: [54 6 102 111 111]
// Output: [54 6 102 111 111]
// {A:27 B:foo}
}
12 changes: 6 additions & 6 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"log"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
)

func ExampleParse() {
Expand Down Expand Up @@ -82,7 +82,7 @@ func ExampleNewDecoderForSchema() {

fmt.Printf("%+v", simple)

//Output: {A:27 B:foo}
// Output: {A:27 B:foo}
}

func ExampleUnmarshal() {
Expand All @@ -109,7 +109,7 @@ func ExampleUnmarshal() {

fmt.Printf("%+v", simple)

//Output: {A:27 B:foo}
// Output: {A:27 B:foo}
}

func ExampleNewEncoder() {
Expand Down Expand Up @@ -141,7 +141,7 @@ func ExampleNewEncoder() {

fmt.Println(w.Bytes())

//Output: [54 6 102 111 111]
// Output: [54 6 102 111 111]
}

func ExampleNewEncoderForSchema() {
Expand Down Expand Up @@ -170,7 +170,7 @@ func ExampleNewEncoderForSchema() {

fmt.Println(w.Bytes())

//Output: [54 6 102 111 111]
// Output: [54 6 102 111 111]
}

func ExampleMarshal() {
Expand All @@ -197,5 +197,5 @@ func ExampleMarshal() {

fmt.Println(b)

//Output: [54 6 102 111 111]
// Output: [54 6 102 111 111]
}
2 changes: 1 addition & 1 deletion gen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"text/template"

"github.com/ettle/strcase"
"github.com/hamba/avro"
"github.com/hamba/avro/v2"
)

// Config exposes the options available for the code generation.
Expand Down
2 changes: 1 addition & 1 deletion gen/gen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"testing"

"github.com/hamba/avro/gen"
"github.com/hamba/avro/v2/gen"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
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/hamba/avro
module github.com/hamba/avro/v2

go 1.16

Expand Down
2 changes: 1 addition & 1 deletion internal/bytesx/reset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"io"
"testing"

"github.com/hamba/avro/internal/bytesx"
"github.com/hamba/avro/v2/internal/bytesx"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion ocf/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"log"
"os"

"github.com/hamba/avro/ocf"
"github.com/hamba/avro/v2/ocf"
)

func ExampleNewDecoder() {
Expand Down
4 changes: 2 additions & 2 deletions ocf/ocf.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"fmt"
"io"

"github.com/hamba/avro"
"github.com/hamba/avro/internal/bytesx"
"github.com/hamba/avro/v2"
"github.com/hamba/avro/v2/internal/bytesx"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions ocf/ocf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"os"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/ocf"
"github.com/hamba/avro/v2"
"github.com/hamba/avro/v2/ocf"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package avro_test
import (
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion reader_generic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion reader_skip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"testing"

"github.com/hamba/avro"
"github.com/hamba/avro/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
Loading

0 comments on commit 141d02a

Please sign in to comment.