You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add validation to Config struct to ensure server name and version are provided:
- Add Config.Validate() method that checks for empty Name and Version fields
- Integrate validation into New() constructor with descriptive error messages
- Add comprehensive tests for validation scenarios (valid, empty name, empty version)
- Return clear error messages: "invalid config: server name cannot be empty"
This prevents silent failures and improves developer experience by catching
configuration errors early with actionable error messages.
0 commit comments