Skip to content

Commit cc7fd6b

Browse files
author
David Cavazos
committed
return nil if error
1 parent 25b6929 commit cc7fd6b

File tree

1 file changed

+2
-2
lines changed
  • .github/cloud-samples-tools/pkg/config

1 file changed

+2
-2
lines changed

.github/cloud-samples-tools/pkg/config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ func LoadConfig(path string) (*Config, error) {
7272
var config Config
7373
err = json.Unmarshal(sourceJson, &config)
7474
if err != nil {
75-
return &config, err
75+
return nil, err
7676
}
7777

7878
// Set default values if they are not set.
7979
if config.PackageFile == nil {
80-
return &config, errors.New("package-file is required")
80+
return nil, errors.New("package-file is required")
8181
}
8282
if config.Match == nil {
8383
config.Match = []string{"*"}

0 commit comments

Comments
 (0)