diff --git a/README.md b/README.md index 4dd5ecb2..65c58560 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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@ +go install github.com/hamba/avro/v2/cmd/avrogen@ ``` Example usage assuming there's a valid schema in `in.avsc`: diff --git a/avro_test.go b/avro_test.go index da26c993..9839e27f 100644 --- a/avro_test.go +++ b/avro_test.go @@ -1,6 +1,6 @@ package avro_test -import "github.com/hamba/avro" +import "github.com/hamba/avro/v2" func ConfigTeardown() { // Reset the caches diff --git a/bench_test.go b/bench_test.go index f60900d5..c3f849c1 100644 --- a/bench_test.go +++ b/bench_test.go @@ -4,7 +4,7 @@ import ( "io/ioutil" "testing" - "github.com/hamba/avro" + "github.com/hamba/avro/v2" ) type Superhero struct { diff --git a/cmd/avrogen/main.go b/cmd/avrogen/main.go index b395cc6b..4a8a4990 100644 --- a/cmd/avrogen/main.go +++ b/cmd/avrogen/main.go @@ -9,7 +9,7 @@ import ( "path/filepath" "strings" - "github.com/hamba/avro/gen" + "github.com/hamba/avro/v2/gen" ) type rawOpts struct { diff --git a/codec_marshaler_test.go b/codec_marshaler_test.go index 69f6410c..b42d1acf 100644 --- a/codec_marshaler_test.go +++ b/codec_marshaler_test.go @@ -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" ) diff --git a/codec_skip_test.go b/codec_skip_test.go index 189a5982..e5ad484f 100644 --- a/codec_skip_test.go +++ b/codec_skip_test.go @@ -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" ) diff --git a/decoder_array_test.go b/decoder_array_test.go index 51cfc414..4b2da9a2 100644 --- a/decoder_array_test.go +++ b/decoder_array_test.go @@ -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" ) diff --git a/decoder_dynamic_test.go b/decoder_dynamic_test.go index 05e0f160..7671b66b 100644 --- a/decoder_dynamic_test.go +++ b/decoder_dynamic_test.go @@ -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" ) diff --git a/decoder_enum_test.go b/decoder_enum_test.go index 7e5bba98..08802b31 100644 --- a/decoder_enum_test.go +++ b/decoder_enum_test.go @@ -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" ) diff --git a/decoder_fixed_test.go b/decoder_fixed_test.go index 3980a1e9..300daa3d 100644 --- a/decoder_fixed_test.go +++ b/decoder_fixed_test.go @@ -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" ) diff --git a/decoder_map_test.go b/decoder_map_test.go index 28714a9f..5a6d16e6 100644 --- a/decoder_map_test.go +++ b/decoder_map_test.go @@ -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" ) diff --git a/decoder_native_test.go b/decoder_native_test.go index afe3a746..1eae8c53 100644 --- a/decoder_native_test.go +++ b/decoder_native_test.go @@ -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" ) diff --git a/decoder_record_test.go b/decoder_record_test.go index a55ffa8a..dad94ad9 100644 --- a/decoder_record_test.go +++ b/decoder_record_test.go @@ -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" ) diff --git a/decoder_test.go b/decoder_test.go index b77ae7e0..bda9d27d 100644 --- a/decoder_test.go +++ b/decoder_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - "github.com/hamba/avro" + "github.com/hamba/avro/v2" "github.com/stretchr/testify/assert" ) diff --git a/decoder_union_test.go b/decoder_union_test.go index 74789830..c3b91054 100644 --- a/decoder_union_test.go +++ b/decoder_union_test.go @@ -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" ) diff --git a/encoder_array_test.go b/encoder_array_test.go index b0cd7cff..cf07c40e 100644 --- a/encoder_array_test.go +++ b/encoder_array_test.go @@ -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" ) diff --git a/encoder_enum_test.go b/encoder_enum_test.go index d1e7283c..91254892 100644 --- a/encoder_enum_test.go +++ b/encoder_enum_test.go @@ -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" ) diff --git a/encoder_fixed_test.go b/encoder_fixed_test.go index 655cfad7..cc21511f 100644 --- a/encoder_fixed_test.go +++ b/encoder_fixed_test.go @@ -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" ) diff --git a/encoder_map_test.go b/encoder_map_test.go index 75c45cde..29230304 100644 --- a/encoder_map_test.go +++ b/encoder_map_test.go @@ -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" ) diff --git a/encoder_native_test.go b/encoder_native_test.go index a050ca79..4863439c 100644 --- a/encoder_native_test.go +++ b/encoder_native_test.go @@ -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" ) diff --git a/encoder_record_test.go b/encoder_record_test.go index 3240760e..95d2080c 100644 --- a/encoder_record_test.go +++ b/encoder_record_test.go @@ -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" ) diff --git a/encoder_test.go b/encoder_test.go index 995f3172..8f806012 100644 --- a/encoder_test.go +++ b/encoder_test.go @@ -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" ) diff --git a/encoder_union_test.go b/encoder_union_test.go index aae1677c..eccfd5c6 100644 --- a/encoder_union_test.go +++ b/encoder_union_test.go @@ -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" ) diff --git a/example_resolver_test.go b/example_resolver_test.go index 29809f94..9b98498b 100644 --- a/example_resolver_test.go +++ b/example_resolver_test.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/hamba/avro" + "github.com/hamba/avro/v2" ) func ExampleRegister() { @@ -21,5 +21,5 @@ func ExampleRegister() { fmt.Println(result) - //Output: B + // Output: B } diff --git a/example_simple_test.go b/example_simple_test.go index 3086edb8..c2582412 100644 --- a/example_simple_test.go +++ b/example_simple_test.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/hamba/avro" + "github.com/hamba/avro/v2" ) var Schema = `{ @@ -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} } diff --git a/example_test.go b/example_test.go index 56c08579..e06790ec 100644 --- a/example_test.go +++ b/example_test.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/hamba/avro" + "github.com/hamba/avro/v2" ) func ExampleParse() { @@ -82,7 +82,7 @@ func ExampleNewDecoderForSchema() { fmt.Printf("%+v", simple) - //Output: {A:27 B:foo} + // Output: {A:27 B:foo} } func ExampleUnmarshal() { @@ -109,7 +109,7 @@ func ExampleUnmarshal() { fmt.Printf("%+v", simple) - //Output: {A:27 B:foo} + // Output: {A:27 B:foo} } func ExampleNewEncoder() { @@ -141,7 +141,7 @@ func ExampleNewEncoder() { fmt.Println(w.Bytes()) - //Output: [54 6 102 111 111] + // Output: [54 6 102 111 111] } func ExampleNewEncoderForSchema() { @@ -170,7 +170,7 @@ func ExampleNewEncoderForSchema() { fmt.Println(w.Bytes()) - //Output: [54 6 102 111 111] + // Output: [54 6 102 111 111] } func ExampleMarshal() { @@ -197,5 +197,5 @@ func ExampleMarshal() { fmt.Println(b) - //Output: [54 6 102 111 111] + // Output: [54 6 102 111 111] } diff --git a/gen/gen.go b/gen/gen.go index 8741fcb7..74379e95 100644 --- a/gen/gen.go +++ b/gen/gen.go @@ -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. diff --git a/gen/gen_test.go b/gen/gen_test.go index 7fa96491..50c34132 100644 --- a/gen/gen_test.go +++ b/gen/gen_test.go @@ -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" ) diff --git a/go.mod b/go.mod index 09341c05..a0484c56 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/hamba/avro +module github.com/hamba/avro/v2 go 1.16 diff --git a/internal/bytesx/reset_test.go b/internal/bytesx/reset_test.go index f77ce953..229c6b6e 100644 --- a/internal/bytesx/reset_test.go +++ b/internal/bytesx/reset_test.go @@ -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" ) diff --git a/ocf/example_test.go b/ocf/example_test.go index 3f5c8612..b8b014a7 100644 --- a/ocf/example_test.go +++ b/ocf/example_test.go @@ -4,7 +4,7 @@ import ( "log" "os" - "github.com/hamba/avro/ocf" + "github.com/hamba/avro/v2/ocf" ) func ExampleNewDecoder() { diff --git a/ocf/ocf.go b/ocf/ocf.go index b1e7e7f0..ebf31bf6 100644 --- a/ocf/ocf.go +++ b/ocf/ocf.go @@ -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 ( diff --git a/ocf/ocf_test.go b/ocf/ocf_test.go index 487f983e..6084145e 100644 --- a/ocf/ocf_test.go +++ b/ocf/ocf_test.go @@ -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" ) diff --git a/protocol_test.go b/protocol_test.go index 3dbe674b..c9cc0a34 100644 --- a/protocol_test.go +++ b/protocol_test.go @@ -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" ) diff --git a/reader_generic_test.go b/reader_generic_test.go index 5134888a..b58cb225 100644 --- a/reader_generic_test.go +++ b/reader_generic_test.go @@ -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" ) diff --git a/reader_skip_test.go b/reader_skip_test.go index c6115f28..d424f087 100644 --- a/reader_skip_test.go +++ b/reader_skip_test.go @@ -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" ) diff --git a/reader_test.go b/reader_test.go index de39a641..5488493f 100644 --- a/reader_test.go +++ b/reader_test.go @@ -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" ) diff --git a/registry/client.go b/registry/client.go index 33662135..d9f08d1c 100644 --- a/registry/client.go +++ b/registry/client.go @@ -21,7 +21,7 @@ import ( "sync" "time" - "github.com/hamba/avro" + "github.com/hamba/avro/v2" jsoniter "github.com/json-iterator/go" ) diff --git a/registry/client_test.go b/registry/client_test.go index 6d637751..de91daba 100644 --- a/registry/client_test.go +++ b/registry/client_test.go @@ -6,7 +6,7 @@ import ( "net/http/httptest" "testing" - "github.com/hamba/avro/registry" + "github.com/hamba/avro/v2/registry" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/registry/example_test.go b/registry/example_test.go index e2ad1a61..2b494962 100644 --- a/registry/example_test.go +++ b/registry/example_test.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/hamba/avro/registry" + "github.com/hamba/avro/v2/registry" ) func Example() { diff --git a/schema.go b/schema.go index a60e9436..09009d34 100644 --- a/schema.go +++ b/schema.go @@ -11,7 +11,7 @@ import ( "sync" "sync/atomic" - "github.com/hamba/avro/pkg/crc64" + "github.com/hamba/avro/v2/pkg/crc64" jsoniter "github.com/json-iterator/go" ) diff --git a/schema_canonical_test.go b/schema_canonical_test.go index a47d1332..dded96d8 100644 --- a/schema_canonical_test.go +++ b/schema_canonical_test.go @@ -4,7 +4,7 @@ import ( "strconv" "testing" - "github.com/hamba/avro" + "github.com/hamba/avro/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/schema_compatibility_test.go b/schema_compatibility_test.go index 1c414554..07044f05 100644 --- a/schema_compatibility_test.go +++ b/schema_compatibility_test.go @@ -3,7 +3,7 @@ package avro_test import ( "testing" - "github.com/hamba/avro" + "github.com/hamba/avro/v2" "github.com/stretchr/testify/assert" ) diff --git a/schema_json_test.go b/schema_json_test.go index 554e8612..7fb30f1e 100644 --- a/schema_json_test.go +++ b/schema_json_test.go @@ -5,7 +5,7 @@ import ( "strconv" "testing" - "github.com/hamba/avro" + "github.com/hamba/avro/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/schema_test.go b/schema_test.go index 66c2768a..78d1b677 100644 --- a/schema_test.go +++ b/schema_test.go @@ -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" ) diff --git a/writer_test.go b/writer_test.go index 51634875..b4345e08 100644 --- a/writer_test.go +++ b/writer_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - "github.com/hamba/avro" + "github.com/hamba/avro/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" )