Installation
Requirements
Section titled “Requirements”- Go 1.26 or later
- An active Go module (
go.mod)
Install
Section titled “Install”Run this in your project directory:
go get github.com/LarsArtmann/gogenfilter@latestQuick Usage
Section titled “Quick Usage”package main
import ( "fmt" "github.com/LarsArtmann/gogenfilter")
func main() { // Create a filter that detects all supported generator types filter := gogenfilter.NewFilter( gogenfilter.Enabled(), gogenfilter.WithFilterOptions(gogenfilter.FilterAll), )
// Check if a file should be filtered filtered, reason := filter.DetectReason("user.sql.go") if filtered { fmt.Printf("Filtered: %s - Reason: %s\n", "user.sql.go", reason) }}Import Options
Section titled “Import Options”// Core functionalityimport "github.com/LarsArtmann/gogenfilter"
// Specific typesimport ( "github.com/LarsArtmann/gogenfilter" "github.com/bmatcuk/doublestar/v4" // for pattern matching)Verify Installation
Section titled “Verify Installation”go list -m github.com/LarsArtmann/gogenfilterNext Steps
Section titled “Next Steps”- Follow the Quick Start for complete examples
- Learn about Filter Options to customize detection
- See Supported Generators for the full list