From 3a86905b140c57e873f7f3f2e04722175f159569 Mon Sep 17 00:00:00 2001 From: leo Date: Sat, 13 May 2023 19:44:32 +0200 Subject: [PATCH] config: rename LoadConfig to Load --- config/config.go | 2 +- config/config_test.go | 4 ++-- run.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/config.go b/config/config.go index 25f92f4..cc3ff5e 100644 --- a/config/config.go +++ b/config/config.go @@ -35,7 +35,7 @@ const schemaCompatibility = "0.0.0" //nolint:unused var log slogging.Slogger -func LoadConfig(conf string, isPath bool) (*Config, error) { +func Load(conf string, isPath bool) (*Config, error) { var config Config var err error diff --git a/config/config_test.go b/config/config_test.go index 8ccf241..fc86124 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -99,9 +99,9 @@ func TestConfig(t *testing.T) { shouldFail := tc.fails if tc.isPath { - _, err = LoadConfig(confPath+tc.conf, tc.isPath) + _, err = Load(confPath+tc.conf, tc.isPath) } else { - _, err = LoadConfig(tc.conf, tc.isPath) + _, err = Load(tc.conf, tc.isPath) } switch { diff --git a/run.go b/run.go index bde42e3..015f13a 100644 --- a/run.go +++ b/run.go @@ -87,7 +87,7 @@ func run() error { // TODO: SBOM: https://actuated.dev/blog/sbom-in-github-actions // TODO: SBOM: https://www.docker.com/blog/generate-sboms-with-buildkit/ - conf, err := config.LoadConfig(*configFlag, *configIsPathFlag) + conf, err := config.Load(*configFlag, *configIsPathFlag) if err != nil { return fmt.Errorf("couldn't load config file '%s', full err: %w", *configFlag, err) }