config: rename LoadConfig to Load
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
leo 2023-05-13 19:44:32 +02:00
parent 23bd5df200
commit 3a86905b14
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ
3 changed files with 4 additions and 4 deletions

@ -35,7 +35,7 @@ const schemaCompatibility = "0.0.0" //nolint:unused
var log slogging.Slogger var log slogging.Slogger
func LoadConfig(conf string, isPath bool) (*Config, error) { func Load(conf string, isPath bool) (*Config, error) {
var config Config var config Config
var err error var err error

@ -99,9 +99,9 @@ func TestConfig(t *testing.T) {
shouldFail := tc.fails shouldFail := tc.fails
if tc.isPath { if tc.isPath {
_, err = LoadConfig(confPath+tc.conf, tc.isPath) _, err = Load(confPath+tc.conf, tc.isPath)
} else { } else {
_, err = LoadConfig(tc.conf, tc.isPath) _, err = Load(tc.conf, tc.isPath)
} }
switch { switch {

2
run.go

@ -87,7 +87,7 @@ func run() error {
// TODO: SBOM: https://actuated.dev/blog/sbom-in-github-actions // TODO: SBOM: https://actuated.dev/blog/sbom-in-github-actions
// TODO: SBOM: https://www.docker.com/blog/generate-sboms-with-buildkit/ // 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 { if err != nil {
return fmt.Errorf("couldn't load config file '%s', full err: %w", *configFlag, err) return fmt.Errorf("couldn't load config file '%s', full err: %w", *configFlag, err)
} }