Attention Golang users - the latest 2.x.x is out (...
# pact-go
m
Attention Golang users - the latest 2.x.x is out (2.0.0-beta.13)! 🚀 This is quite a big change from the past release, namely I’ve been thinking on the API design with the introduction of V4 and plugins. Summary: • V4 Pact support • Support for synchronous messages • Support for plugins (e.g. for gRPC support https://github.com/pact-foundation/pact-go/tree/2.x.x/examples/grpc) Because the API is more complex, i’ve used a type state builder pattern to force which options can be used at any point in time, and ensure that pre-requisite methods are called in sequence. I’m still not 100% happy with the HTTP package layout (and requiring V2/V3/V4 prefixes on a number of types), so there might be another refactor in that space, but mainly I think it would just be the names of types and packages that could change. I’ll tidy up the documentation over the next few days, but look to the examples folder in the short term if you’re wondering what’s changed. I found refactoring the existing examples fairly straightforward, so I hope you do too. Feedback welcome 🙏
y
Epic work Matt 🚀 Is there a couple of reference PR's or commit refs that show the examples change delta, as that would form a great basis for an upgrade guide?
Looking forward to feedback from our lovely community of go builders!
m
Could definitely diff between v2.0.0-beta.11 and v2.0.0-beta.14
I have a migration guide from the previous major/stable, which I’ll update over the next few days.
👌 1
I’m hopeful that with the new API, it should guide the users with the “next step” and the refactor.
👌 1
the types say “ok you can do this next” and in some cases, it’s just one or two options. So once you have the starting point, the code writes itself 😉
🤖 1
oh yeah 1
s
so @Matt (pactflow.io / pact-js / pact-go), everything is ready for pact to support grpc for golang, right?
is it safe to say that pact can talk over http 2.0?
m
is it safe to say that pact can talk over http 2.0?
It depends on what you mean by that
, everything is ready for pact to support grpc for golang, right?
There is a beta branch (2.x.x) that is ready for testing, yes. There will likely be some API changes as we smooth it out, but the gRPC support is there and there is an example project you can base off