Skip to content

Instantly share code, notes, and snippets.

@disegmvm
Created May 1, 2023 09:52
Show Gist options
  • Save disegmvm/5819f7678c809c4bab0ee632b40e9e9d to your computer and use it in GitHub Desktop.
Save disegmvm/5819f7678c809c4bab0ee632b40e9e9d to your computer and use it in GitHub Desktop.
// Store contract remotely
publisher := dsl.Publisher{}
err = publisher.Publish(types.PublishRequest{
PactURLs: []string{"../client/pacts/sample_consumer-sample_provider.json"},
PactBroker: "https://pen.pactflow.io/", //link to your remote Contract broker
BrokerToken: "xxx", //your PactFlow token
ConsumerVersion: "1.0.0",
Tags: []string{"1.0.0", "latest"},
})
if err != nil {
t.Fatal(err)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment