-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add slice environment variables #8
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds slice-type environment variable support (EnvStringSlice, EnvIntSlice, EnvFloatSlice, EnvBoolSlice) with associated constructor functions, methods (Get, GetCustom, IsZero, Equal), and comprehensive test coverage. While the PR description focuses on removing custom UnmarshalJSON implementations, the actual changes introduce new slice functionality.
- Implements four new slice environment variable types with full CRUD operations
- Adds comprehensive test coverage for all slice types including edge cases
- Note: The PR description mentions removing UnmarshalJSON implementations, but the actual changes primarily add new slice types
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| slice.go | Introduces EnvStringSlice, EnvIntSlice, EnvFloatSlice, and EnvBoolSlice types with Get, GetCustom, IsZero, and Equal methods |
| slice_test.go | Adds comprehensive test coverage for all slice types testing Get, GetCustom, IsZero, and Equal methods |
| environment.go | Removes custom UnmarshalJSON implementations and encoding/json import from EnvString, EnvInt, EnvBool, and EnvFloat types |
| map.go | Removes custom UnmarshalJSON implementations and encoding/json import from EnvMapString, EnvMapInt, EnvMapFloat, and EnvMapBool types |
| any.go | Removes custom UnmarshalJSON implementation from EnvAny type |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
This pull request removes all custom
UnmarshalJSONimplementations for environment variable types and map types, as well as associated unused imports. The codebase is now simplified and no longer provides custom JSON unmarshaling logic for these types.Removal of custom JSON unmarshaling:
UnmarshalJSONmethods fromEnvString,EnvInt,EnvBool, andEnvFloattypes inenvironment.go. [1] [2] [3] [4]UnmarshalJSONmethods fromEnvAnyinany.go.UnmarshalJSONmethods fromEnvMapString,EnvMapInt,EnvMapFloat, andEnvMapBooltypes inmap.go. [1] [2] [3] [4]Cleanup of unused imports:
"encoding/json"imports fromenvironment.goandmap.go. [1] [2]