Skip to main content

Go 1.20+ language plugin for semver-dredd

Project description

go-1.20-dredd

Go 1.20+ language plugin for semver-dredd.

Installation

# Install via the core package extra
pip install "semver-dredd[go]"

# Or install the plugin distribution directly
pip install go-1.20-dredd

Or install from local path (development):

pip install ./plugins/go-1.20-dredd

Requirements

  • Python 3.10+
  • semver-dredd >= 1.0.20260704001
  • Go 1.20+ installed and available in PATH

Usage

Once installed, the plugin is automatically discovered by semver-dredd:

# List plugins to verify installation
semver-dredd plugin list
semver-dredd plugin info go

# Generate snapshot for a Go package
semver-dredd snapshot --plugin go --path ./mypackage --version 1.0.0

# Or use the managed init/status/bake workflow
semver-dredd init ./mypackage --plugin go --version 1.0.0
semver-dredd status ./mypackage --plugin go --details
semver-dredd bake ./mypackage --plugin go

How it works

This plugin bundles a Go parser that uses Go's go/ast package to extract:

  • Public functions and their signatures
  • Public types (structs) with exported fields
  • Methods on public types
  • Parameter types and return types

The parser is invoked via go run . from the bundled parser directory.

Scope: include / exclude

include and exclude items are Go import paths relative to the analyzed root directory, using / separators (Go import-path convention), matched recursively:

include: [sub]
exclude: [sub/internal]
  • Empty include (or omitted) analyzes the whole package tree rooted at --path, exactly as without scope.
  • The parser walks the root directory recursively; each subdirectory containing .go files is treated as its own package. The root package's functions/types are unprefixed (preserving pre-scope single-package behavior); nested packages are prefixed with their relative import path, e.g. sub/Area or sub/internal/Helper.
  • exclude is applied after include and supports a trailing * for non-recursive (single import path level) exclusion, e.g. sub/internal* excludes only sub/internal itself, not further-nested packages under it.
  • _test.go files and hidden/vendor/testdata directories are never part of the analyzed API surface.
  • include matching no package produces an empty snapshot API (logged as a warning) rather than falling back to no-scope behavior.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

go_1_20_dredd-1.1.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

go_1_20_dredd-1.1.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file go_1_20_dredd-1.1.0.tar.gz.

File metadata

  • Download URL: go_1_20_dredd-1.1.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for go_1_20_dredd-1.1.0.tar.gz
Algorithm Hash digest
SHA256 185bf164677e5de430bfcab043e5ddd5ccba5fe0ebeffffec18c33efacdbbf2f
MD5 21b65a58ddd80c987d30c7b08263bcbf
BLAKE2b-256 fe29393a66aeca51b1aacd8cc42b468129d1afb44ed4d1d298610424cc4fc83b

See more details on using hashes here.

File details

Details for the file go_1_20_dredd-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: go_1_20_dredd-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for go_1_20_dredd-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 865ac1e98120e36a9f32821dac0cc9bfd26d408cd89ef4914303d6bf056fb220
MD5 b24612f928f171198e0c9f509fef3533
BLAKE2b-256 7785f2365ed074f73c144f8d26e6f5d820e18e7d1548c6deb78fe9655365f22d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page