From a1b9a5c22cbbb8c3b0bd9f855f963a9d09a70685 Mon Sep 17 00:00:00 2001 From: Jeff Ortel Date: Tue, 10 Oct 2023 15:31:12 -0700 Subject: [PATCH] checkpoint Signed-off-by: Jeff Ortel --- api/analysis.go | 2 +- api/bucket.go | 2 +- tar/filter.go | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api/analysis.go b/api/analysis.go index aa3ba6bb9..459581996 100644 --- a/api/analysis.go +++ b/api/analysis.go @@ -2284,7 +2284,7 @@ func (r *ReportWriter) Write(id uint) { tarWriter.Close() }() filter := tar.NewFilter(reportDir) - filter.Excluded("output.js") + filter.Exclude("output.js") tarWriter.Filter = filter err = tarWriter.AssertDir(Settings.Analysis.ReportPath) if err != nil { diff --git a/api/bucket.go b/api/bucket.go index 01a31d06f..42d4c0934 100644 --- a/api/bucket.go +++ b/api/bucket.go @@ -232,7 +232,7 @@ func (h *BucketOwner) bucketGet(ctx *gin.Context, id uint) { } if st.IsDir() { filter := tar.NewFilter(path) - filter.Included(ctx.Query(Filter)) + filter.Include(ctx.Query(Filter)) if h.Accepted(ctx, binding.MIMEHTML) { h.getFile(ctx, m) } else { diff --git a/tar/filter.go b/tar/filter.go index 2b7fa0361..d21de023d 100644 --- a/tar/filter.go +++ b/tar/filter.go @@ -43,16 +43,16 @@ func (r *Filter) Match(path string) (b bool) { } // -// Included adds included patterns. +// Include adds included patterns. // Empty ("") patterns are ignored. -func (r *Filter) Included(patterns ...string) { +func (r *Filter) Include(patterns ...string) { r.included.Add(patterns...) } // -// Excluded adds excluded patterns. +// Exclude adds excluded patterns. // Empty ("") patterns are ignored. -func (r *Filter) Excluded(patterns ...string) { +func (r *Filter) Exclude(patterns ...string) { r.excluded.Add(patterns...) }