filter

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: BSD-2-Clause Imports: 2 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.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseRepoAllowlist

func ParseRepoAllowlist(raw string) ([]string, error)

ParseRepoAllowlist parses a comma-separated allowlist string into a slice of host-qualified repo keys. Whitespace is trimmed; empty entries are skipped. Returns (nil, nil) for empty input (allow-all). Entry well-formedness is NOT validated here — repoallowlist.IsAllowed handles malformed entries gracefully at match time (logs and skips).

Types

type RepoFilter

type RepoFilter interface {
	Skip(repoKey string) bool // repoKey = "host/owner/repo"
}

RepoFilter decides whether to skip a repo in a poll cycle. Skip returns true if the repo should be excluded.

func NewRepoAllowlistFilter

func NewRepoAllowlistFilter(allowlist []string) RepoFilter

NewRepoAllowlistFilter returns a RepoFilter that skips repos not in the allowlist. An empty allowlist never skips (allow-all).

type RepoFilters

type RepoFilters []RepoFilter

RepoFilters is an OR-composite: skip if ANY filter votes to skip. An empty slice never skips (allow-all).

func (RepoFilters) Skip

func (filters RepoFilters) Skip(repoKey string) bool

Skip returns true if any contained filter votes skip.

Jump to

Keyboard shortcuts

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