osversion: Add Parse function and make partially cross-platform#2019
osversion: Add Parse function and make partially cross-platform#2019vvoland wants to merge 2 commits intomicrosoft:mainfrom
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.
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
OSVersionstruct.osversion: Make OSVersion cross-platform
Move non-Windows dependent code outside of the
windowsbuild 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.