plugger

command
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 6 Imported by: ? 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

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