-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
osversion: Add Parse function and make partially cross-platform #2019
Conversation
32c7df8
to
9dc447e
Compare
osversion/osversion.go
Outdated
return osv | ||
} | ||
|
||
// Parse parses a string representation of OSVersion. |
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.
perhaps we could add an example input value to outline the expected format (if there's a reference link somewhere, I guess that could be useful, but not strictly necessary).
c8b6a9f
to
95bc44c
Compare
95bc44c
to
61f6538
Compare
Move non-Windows dependent code outside of the `windows` build tagged files. This makes it possible to use the version parse/stringifying code on non-Windows platforms and keep the code that interacts with Windows API only for the Windows builds. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Add function that parses the string representation back to the OSVersion struct. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
61f6538
to
7f373db
Compare
Added a comment to the github issue #2018 so all the discussion is in one place for future reference as well :) |
Closing this based on the discussion at #2018. Can discuss this further on the github issue if required. |
address: #2018
osversion: Add Parse function
Add function that parses the string representation back to the
OSVersion
struct.osversion: Make OSVersion cross-platform
Move non-Windows dependent code outside of the
windows
build tagged files. This makes it possible to use the version parse/stringifying code on non-Windows platforms and keep the code that interacts with Windows API only for the Windows builds.