Skip to content

Commit

Permalink
Update README with information on Go modules
Browse files Browse the repository at this point in the history
Go module support will be reverted in #774. Here, we update the README
with some information about the status of Go modules in stripe-go, and
how to use the library with them for the time being.
  • Loading branch information
brandur committed Jan 16, 2019
1 parent fda9dbb commit 34d1f73
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,21 @@ import (

### Go Module Support

The library supports Go's [experimental modules][modules]. Add stripe-go as a
requirement in your `go.mod` along with its current version:
The library currently *does not* ship with first-class support for Stripe
modules. We put in support for it before, but ran into compatibility problems
for existing installations using Dep (see discussion in [closer to the bottom
of this thread][gomodvsdep], and [reverted support][gomodrevert]. Our current
plan is to wait for better module compatibility in Dep (see a [preliminary
patch here][depgomodsupport]), give the release a little grace time to become
more widely distributed, then bring support back.

For now, require stripe-go in `go.mod` like this:

``` go
module github.com/my/package

require (
github.com/stripe/stripe-go/v55 v55.9.0
)
```

Imports should contain the major version as a virtual component of each path:

``` go
import (
"github.com/stripe/stripe-go/v55"
"github.com/stripe/stripe-go/v55/customer"
github.com/stripe/stripe-go/v55
)
```

Expand Down Expand Up @@ -323,7 +321,10 @@ pull request][pulls].
[api-docs]: https://stripe.com/docs/api/go
[api-changelog]: https://stripe.com/docs/upgrades
[connect]: https://stripe.com/docs/connect/authentication
[depgomodsupport]: https://github.com/golang/dep/pull/1963
[godoc]: http://godoc.org/github.com/stripe/stripe-go
[gomodrevert]: https://github.com/stripe/stripe-go/pull/774
[gomodvsdep]: https://github.com/stripe/stripe-go/pull/712
[issues]: https://github.com/stripe/stripe-go/issues/new
[modules]: https://github.com/golang/go/wiki/Modules
[package-management]: https://code.google.com/p/go-wiki/wiki/PackageManagementTools
Expand Down

0 comments on commit 34d1f73

Please sign in to comment.