fix nil pointer when no server provided (or miss-spelled) #1

Merged
perny merged 3 commits from tropicalshadow/plugstep:main into main 2026-01-18 23:54:03 +02:00
Contributor
  • return error if the server is default
  • updated .gitignore to exclude runtime & intellij files from git
- return error if the server is default - updated .gitignore to exclude runtime & intellij files from git
perny requested changes 2026-01-18 19:21:33 +02:00
Dismissed
@ -15,1 +17,4 @@
if config.Server == (ServerConfig{}) {
log.Error("no server configuration found in config file")
return nil, errors.New("no server configuration found in config file")
Owner

We use fmt.Errorf for all returned errors, not errors.New

We use `fmt.Errorf` for all returned errors, not `errors.New`
Author
Contributor

I am still new to the ways of go, fmt.Errorf has been put into action, I have also removed the prior error log due to the returning error being logged anyways

I am still new to the ways of go, fmt.Errorf has been put into action, I have also removed the prior error log due to the returning error being logged anyways
tropicalshadow marked this conversation as resolved
perny approved these changes 2026-01-18 23:53:22 +02:00
perny left a comment
Owner

LGTM

LGTM
perny merged commit 99f5142abf into main 2026-01-18 23:54:03 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mineframe/plugstep!1
No description provided.