Types
FilterOption
Section titled “FilterOption”A string type representing a generator category to filter.
type FilterOption stringMethods
Section titled “Methods”String() string— returns the underlying string valueReason() (FilterReason, bool)— returns the correspondingFilterReason. Returns("", false)for meta-options likeFilterAllor unregistered options.IsValid() bool— reports whether the value is recognized
Constants
Section titled “Constants”FilterSQLC, FilterTempl, FilterGoEnum, FilterProtobuf, FilterOapi, FilterDeepcopy, FilterWire, FilterMoq, FilterMockgen, FilterStringer, FilterGeneric, FilterAll
FilterReason
Section titled “FilterReason”A string type representing why a file was filtered.
type FilterReason stringMethods
Section titled “Methods”String() string— returns the underlying string valueIsValid() bool— reports whether the value is recognized
Constants
Section titled “Constants”ReasonSQLC, ReasonTempl, ReasonGoEnum, ReasonProtobuf, ReasonOapi, ReasonDeepcopy, ReasonWire, ReasonMoq, ReasonMockgen, ReasonStringer, ReasonGeneric, ReasonOutsideScope, ReasonExcludePattern, ReasonNotFiltered
Derived Lists
Section titled “Derived Lists”AllFilterOptions() []FilterOption
Section titled “AllFilterOptions() []FilterOption”Returns all 12 valid FilterOption values (11 detector options + FilterAll).
AllGeneratorOptions() []FilterOption
Section titled “AllGeneratorOptions() []FilterOption”Returns all 11 detector FilterOption values (excludes FilterAll). Use when enumerating available generators rather than validating options.
AllFilterReasons() []FilterReason
Section titled “AllFilterReasons() []FilterReason”Returns all 14 valid FilterReason values.
All three are derived from the internal detectors table — AllFilterOptions() also includes FilterAll, and AllFilterReasons() also includes ReasonOutsideScope, ReasonExcludePattern, and ReasonNotFiltered.
FilterConfig
Section titled “FilterConfig”A functional option type for configuring a Filter via NewFilter.
type FilterConfig func(*Filter) errorCreated by WithFilterOptions, WithFS, WithIncludePatterns, and WithExcludePatterns. Passed to NewFilter(configs ...FilterConfig).
Invariant
Section titled “Invariant”Each FilterOption and its matching FilterReason share the same underlying string value (e.g., FilterSQLC == "sqlc" == ReasonSQLC).