command

package
v2.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package command contains the basic CLI commands to run Pact Go.

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "pact-go",
	Short: "Pact Go makes it easier to work with Pact with Golang projects",
	Long: `Pact Go is a utility that wraps a number of external applications into
an idiomatic Golang interface and CLI, providing a mock service and DSL for
the consumer project, and interaction playback and verification for the
service provider project.`,
}

RootCmd represents the base command when called without any subcommands.

View Source
var (
	Version = "dev"
)

Version is the Pact Go version. It is normally left as "dev" here and resolved automatically:

  • Official release binaries (built via `goreleaser`) have this overridden at build time via -ldflags (see .goreleaser.yml).
  • Builds via `go install github.com/pact-foundation/pact-go/v2@vX.Y.Z`, or when pact-go is imported as a module dependency, resolve it from the Go module's build info at runtime, so no source change is needed.

There is no version to bump for a release - see docs/contributing/releasing.md.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址