-
Notifications
You must be signed in to change notification settings - Fork 62
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
chore: go 1.23 upgrade, README fix, docstring additions, & go styling updates #28
Conversation
…ing updates Signed-off-by: sheikhrachel <[email protected]>
Signed-off-by: sheikhrachel <[email protected]>
cc @patricksanders (👋) if you know of the right person to tag here for a review |
Hey @sheikhrachel, nice to see you around these parts. Thanks for the PR! I'll take a look. |
go.mod
Outdated
@@ -1,3 +1,3 @@ | |||
module github.com/Netflix/go-env | |||
|
|||
go 1.22 | |||
go 1.23.2 |
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.
Is the .2
minor revision a hard requirement here? If not, let's just make this 1.23
to avoid things like #26
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.
Not necessary - updated to just go 1.23 and updated title/description to match ✅
Signed-off-by: Rachel <[email protected]>
Signed-off-by: Rachel <[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.
LGTM, thanks for the housekeeping!
Purpose
I've contributed to a couple of Netflix OSS projects in the past (weep and consoleme), and wanted to give some TLC to this package to bring it up-to-date with fixes to the README examples, an update to the Go version, and code-style improvements to align with updates to the Go language in recent updates.
Happy to discuss / elaborate on any of my proposals in this change / sidecar scope into separate changes if desired 🙏
Updating the project's Go version
1.22
to1.23
- 1.23 release notesReadme fixes
env
import aliases is redundant, as the import is targeted at the name after the hyphen old source on this behaviourrequired
linting that fails when calling the usage example as-is to surface attention around the built-in validation logicpackage main
block to the second example to allow for simpler copy/pasting into a playground or projectMarshal
andUnmarshalFromEnviron
take pointers to the Environment/Config structs to prevent theErrInvalidValue
error from being returnedTest semantics
Conditional var-scoping
Increased usage of
continue
Range over int
for i := 0; i < 5; i++
by simply declaring the integer range to iterate over, ex.for i := range 5
Consts & Docstrings
env.go
to provide more clarity into the library / improve switch performance when parsing tags