sample

command
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Hello vacuum user!

If you would like to try out this custom golang plugin, there are a few steps you need to take.

First, make sure you have the code checked out.

git clone https://github.com/daveshanley/vacuum.git && cd vacuum/plugin/sample

The sample uses the root module so its dependencies match the host. Build both with the same Go toolchain. Custom plugins must use github.com/pb33f/go-yaml for RunRule nodes and must be rebuilt after upgrading Vacuum.

Once checked out, compile the plugin.

GOWORK=off go build -buildmode=plugin -o sample.so .

Go back up into the vacuum directory and compile vacuum

cd ../../ && GOWORK=off go build -o vacuum .

Now we can run the sample ruleset that uses custom functions, with an OpenAPI specification. Use the -f flag to specify the path to the sample plugin.

./vacuum lint -r rulesets/examples/sample-plugin-ruleset.yaml -f plugin/sample /path/to/openapi.yaml

vacuum should locate the functions and run without issue. The following output should be displayed:

 INFO  Located custom function plugin: plugin/sample/sample.so
 INFO  Loaded 2 custom function(s) successfully.
 INFO  Linting against 2 rules: https://quobix.com/vacuum/rulesets/custom-rulesets

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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