Skip to content

Commit 3f0ebb8

Browse files
authored
Must have struct for json to work, not nil (#70)
1 parent 9ca6d95 commit 3f0ebb8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

github/auth.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func LoadGithubAppConfigFromEnv(envVarName string) (*GithubAppConfig, error) {
6262
return nil, err
6363
}
6464

65-
var githubAppConfig *GithubAppConfig
66-
jsonLoadErr := json.Unmarshal([]byte(githubAppConfigJSON), githubAppConfig)
67-
return githubAppConfig, errors.WithStackTrace(jsonLoadErr)
65+
var githubAppConfig GithubAppConfig
66+
jsonLoadErr := json.Unmarshal([]byte(githubAppConfigJSON), &githubAppConfig)
67+
return &githubAppConfig, errors.WithStackTrace(jsonLoadErr)
6868
}

0 commit comments

Comments
 (0)