Skip to content

Commit 34d1f73

Browse files
committed
Update README with information on Go modules
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.
1 parent fda9dbb commit 34d1f73

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

README.md

+13-12
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,21 @@ import (
2525

2626
### Go Module Support
2727

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

3138
``` go
3239
module github.com/my/package
3340

3441
require (
35-
github.com/stripe/stripe-go/v55 v55.9.0
36-
)
37-
```
38-
39-
Imports should contain the major version as a virtual component of each path:
40-
41-
``` go
42-
import (
43-
"github.com/stripe/stripe-go/v55"
44-
"github.com/stripe/stripe-go/v55/customer"
42+
github.com/stripe/stripe-go/v55
4543
)
4644
```
4745

@@ -323,7 +321,10 @@ pull request][pulls].
323321
[api-docs]: https://stripe.com/docs/api/go
324322
[api-changelog]: https://stripe.com/docs/upgrades
325323
[connect]: https://stripe.com/docs/connect/authentication
324+
[depgomodsupport]: https://github.com/golang/dep/pull/1963
326325
[godoc]: http://godoc.org/github.com/stripe/stripe-go
326+
[gomodrevert]: https://github.com/stripe/stripe-go/pull/774
327+
[gomodvsdep]: https://github.com/stripe/stripe-go/pull/712
327328
[issues]: https://github.com/stripe/stripe-go/issues/new
328329
[modules]: https://github.com/golang/go/wiki/Modules
329330
[package-management]: https://code.google.com/p/go-wiki/wiki/PackageManagementTools

0 commit comments

Comments
 (0)