plugger

command
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 6 Imported by: 0

README

Plugger

Searches for not registered plugins: a plugin is a struct that implements a given interface.

Usage

~ plugger -h
Usage of plugger:
  -interface value
    list of interfaces (repeatable), ex: '-interface github.com/pkg.Interface'
No lint rules

exclude a function

// This function is called
func NewPlugin() basic.MyPlugin {
    return &basic.PluginA{}
}

// This is treated as alias automatically
func NewPluginAlias(something string) basic.MyPlugin {
    return &basic.PluginA{}
}

// NewForTest: since this function is intended to be used in tests only,
// must be excluded from the lint
//
//nolint:plugger // This function is meant to be used only in testing and returns the same plugin as fun.NewPlugin
func NewForTest(something string) basic.MyPlugin {
    return &basic.PluginA{}
}

or directly exclude a pkg

// Package fakeplugin contains a fake plugin to be used in testing
//
//nolint:plugger // This pkg contains only mocks
package fakeplugin

Documentation

Overview

The plugger command is used to flag plugins which are not registered

Directories

Path Synopsis
Package flags contains logic for handling repeatable flag
Package flags contains logic for handling repeatable flag
Package plugger contain the logic to find un-registered plugins
Package plugger contain the logic to find un-registered plugins

Jump to

Keyboard shortcuts

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