Skip to content

Commit

Permalink
README.md directs users to import using gopkg.in
Browse files Browse the repository at this point in the history
(for both V1 and V2)

This method now works with version agnostic and version aware Go build
tools.
  • Loading branch information
Karrick S. McDermott committed Apr 27, 2018
1 parent c45345f commit 2f3e1df
Showing 1 changed file with 34 additions and 14 deletions.
48 changes: 34 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,40 @@ Goavro is a library that encodes and decodes Avro data.
* Encodes to and decodes from both binary and textual JSON Avro data.
* `Codec` is stateless and is safe to use by multiple goroutines.

With the exception of features not yet supported, goavro attempts to be
fully compliant with the most recent version of the
[Avro specification](http://avro.apache.org/docs/1.8.2/spec.html).
With the exception of features not yet supported, goavro attempts to
be fully compliant with the most recent version of the [Avro
specification](http://avro.apache.org/docs/1.8.2/spec.html).

## Use with Import Statement

[The proposal to add package version support to the Go
toolchain](https://github.com/golang/go/issues/24301) requires library
authors to leave V1 code in the top level directory of the repository,
and create a `v2` directory for V2 of the library.

However this library was tagged with a `v2` release prior to that
proposal, and V1 of this library is no longer at the top level of the
repository. For a while this conflict prevented `go build` and `vgo
build` from both being able to build a program that requires this
library.

Because of a [update to
`vgo`](https://github.com/golang/go/issues/24099) that provides
enhanced support for gopkg.in, now building projects that use either
version agnostic *or* version aware Go build tools will work, provided
this library is imported using its gopkg.in path.

### To use V2 of this library:

```Go
import goavro "gopkg.in/linkedin/goavro.v2"
```

### To use V1 of this library:

```Go
import goavro "gopkg.in/linkedin/goavro.v1"
```

## NOTICE

Expand All @@ -28,17 +59,6 @@ As a consequence of the rewrite, the API has been significantly
simplified, taking into account suggestions from users received during
the past few years since its original release.

The original version of this library is still available, however the
v1 branch does not support all the same features, has a number of
outstanding bugs, and performs significantly slower than the v2
branch. Users are highly encouraged to update their software to use
the v2 branch, but until they do, they can continue to use the v1
branch by modifying import statements:

```Go
import goavro "gopkg.in/linkedin/goavro.v1"
```

### Justification for API Change

It was a very difficult decision to break the API when creating the
Expand Down

0 comments on commit 2f3e1df

Please # to comment.