From 19aaa807365e009ef616f2bb20c84078533d97d5 Mon Sep 17 00:00:00 2001 From: Michael T Lombardi Date: Fri, 11 Feb 2022 15:34:10 -0600 Subject: [PATCH] (GH-342) Add config_processor package Prior to this commit, the only implementation of an interface for the ConfigProcessor lived in the install package; moreover, this interface only included the ProcessConfig function. This commit creates a new public package, config_processor, which contains only a single interface: ConfigProcessorI. This interface includes both the ProcessConfig function and the new CheckConfig function. This will allow external libraries/tools to re-use our code so long as they implement a processor for their own needs which can perform those tasks. This commit does **not** implement or otherwise alter the private configuration processor (pct_config_processor) or any other files. --- pkg/config_processor/config_processor.go | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 pkg/config_processor/config_processor.go diff --git a/pkg/config_processor/config_processor.go b/pkg/config_processor/config_processor.go new file mode 100644 index 00000000..88b23d9f --- /dev/null +++ b/pkg/config_processor/config_processor.go @@ -0,0 +1,6 @@ +package config_processor + +type ConfigProcessorI interface { + ProcessConfig(sourceDir, targetDir string, force bool) (string, error) + CheckConfig(configFile string) error +}