From 2367637e7cd477fc7d03f80a4459de57866a9764 Mon Sep 17 00:00:00 2001 From: RebeccaMahany Date: Wed, 3 Jul 2024 15:12:08 -0400 Subject: [PATCH] Rename sourceConstraints to pathConstraints in function signature --- ee/katc/config.go | 2 +- ee/katc/indexeddb_leveldb.go | 6 +++--- ee/katc/sqlite.go | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ee/katc/config.go b/ee/katc/config.go index 567c6d8ab..f6e0c6926 100644 --- a/ee/katc/config.go +++ b/ee/katc/config.go @@ -17,7 +17,7 @@ import ( // that performs the query against the source. type katcSourceType struct { name string - dataFunc func(ctx context.Context, slogger *slog.Logger, sourcePaths []string, query string, sourceConstraints *table.ConstraintList) ([]sourceData, error) + dataFunc func(ctx context.Context, slogger *slog.Logger, sourcePaths []string, query string, pathConstraints *table.ConstraintList) ([]sourceData, error) } // sourceData holds the result of calling `katcSourceType.dataFunc`. It maps the diff --git a/ee/katc/indexeddb_leveldb.go b/ee/katc/indexeddb_leveldb.go index 5325c32af..ed5c7cd71 100644 --- a/ee/katc/indexeddb_leveldb.go +++ b/ee/katc/indexeddb_leveldb.go @@ -15,7 +15,7 @@ import ( // found at the filepath in `sourcePattern`. It retrieves all rows from the database // and object store specified in `query`, which it expects to be in the format // `.`. -func indexeddbLeveldbData(ctx context.Context, slogger *slog.Logger, sourcePaths []string, query string, sourceConstraints *table.ConstraintList) ([]sourceData, error) { +func indexeddbLeveldbData(ctx context.Context, slogger *slog.Logger, sourcePaths []string, query string, pathConstraints *table.ConstraintList) ([]sourceData, error) { results := make([]sourceData, 0) for _, sourcePath := range sourcePaths { pathPattern := sourcePatternToGlobbablePattern(sourcePath) @@ -32,8 +32,8 @@ func indexeddbLeveldbData(ctx context.Context, slogger *slog.Logger, sourcePaths // Query databases for _, db := range leveldbs { - // Check to make sure `db` adheres to sourceConstraints - valid, err := checkPathConstraints(db, sourceConstraints) + // Check to make sure `db` adheres to pathConstraints + valid, err := checkPathConstraints(db, pathConstraints) if err != nil { return nil, fmt.Errorf("checking source path constraints: %w", err) } diff --git a/ee/katc/sqlite.go b/ee/katc/sqlite.go index 5bc2f684e..ead532521 100644 --- a/ee/katc/sqlite.go +++ b/ee/katc/sqlite.go @@ -13,7 +13,7 @@ import ( ) // sqliteData is the dataFunc for sqlite KATC tables -func sqliteData(ctx context.Context, slogger *slog.Logger, sourcePaths []string, query string, sourceConstraints *table.ConstraintList) ([]sourceData, error) { +func sqliteData(ctx context.Context, slogger *slog.Logger, sourcePaths []string, query string, pathConstraints *table.ConstraintList) ([]sourceData, error) { results := make([]sourceData, 0) for _, sourcePath := range sourcePaths { pathPattern := sourcePatternToGlobbablePattern(sourcePath) @@ -23,8 +23,8 @@ func sqliteData(ctx context.Context, slogger *slog.Logger, sourcePaths []string, } for _, sqliteDb := range sqliteDbs { - // Check to make sure `sqliteDb` adheres to sourceConstraints - valid, err := checkPathConstraints(sqliteDb, sourceConstraints) + // Check to make sure `sqliteDb` adheres to pathConstraints + valid, err := checkPathConstraints(sqliteDb, pathConstraints) if err != nil { return nil, fmt.Errorf("checking source path constraints: %w", err) }