From 6689c36182b3fe23a78ef63bf6014c91fbf3886b Mon Sep 17 00:00:00 2001 From: Anthony Mirabella Date: Wed, 25 Aug 2021 03:40:13 -0400 Subject: [PATCH] Add excludes support to generated go.mod (#63) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Anthony J Mirabella Co-authored-by: Juraci Paixão Kröhling --- internal/builder/config.go | 1 + internal/scaffold/gomod.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/internal/builder/config.go b/internal/builder/config.go index 2aecfdc..fd0a7ea 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -42,6 +42,7 @@ type Config struct { Receivers []Module `mapstructure:"receivers"` Processors []Module `mapstructure:"processors"` Replaces []string `mapstructure:"replaces"` + Excludes []string `mapstructure:"excludes"` } // Distribution holds the parameters for the final binary diff --git a/internal/scaffold/gomod.go b/internal/scaffold/gomod.go index 9890c40..2f49578 100644 --- a/internal/scaffold/gomod.go +++ b/internal/scaffold/gomod.go @@ -50,4 +50,7 @@ require ( {{- range .Replaces}} replace {{.}} {{- end}} +{{- range .Excludes}} +exclude {{.}} +{{- end}} `