-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime error #82
Comments
I think that it is because the configuration are direclty parsed from the config.json file without any adaptation to match the configuration structure in code. This led to undefined variables in the configuration and therefore we have pointers that point to nothing. When trying to manipulate these null pointers we then get the so-called error. I will submit a PR to fix it. func LoadConfiguration(filename string) {
once.Do(func() {
file, err := os.Open(filename)
if err != nil {
log.Fatalf("Failed to open config file: %v", err)
}
defer file.Close()
decoder := json.NewDecoder(file)
err = decoder.Decode(&config) // config structure do not match config.json file structure
fmt.Printf("&s", config.Broker)
if err != nil {
log.Fatalf("Failed to decode config file: %v", err)
}
})
} |
@cedrick-ah thanks for the diagnosis. I will check the PRs in few hours |
Okay, I will be waiting for it. |
@Ederene20 please pull the project on the main branch to confirm the issue has been resolved. |
@koladev32 The issue has been resolved. Thank you @cedrick-ah !! |
Describe the bug
Getting a runtime error when running
go run main.go
.To Reproduce
Steps to reproduce the behavior:
sendhooks
directorygo run main.go
Expected behavior
I get the following error in the terminal :
Screenshots
Desktop:
The text was updated successfully, but these errors were encountered: