cli/compose: use go1.16 native embed functionality for schemas#3253
Merged
silvin-lubecki merged 1 commit intodocker:masterfrom Aug 16, 2021
Merged
cli/compose: use go1.16 native embed functionality for schemas#3253silvin-lubecki merged 1 commit intodocker:masterfrom
silvin-lubecki merged 1 commit intodocker:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3253 +/- ##
=======================================
Coverage 57.99% 57.99%
=======================================
Files 302 302
Lines 21748 21748
=======================================
Hits 12613 12613
Misses 8212 8212
Partials 923 923 |
Member
Author
|
@cpuguy83 @silvin-lubecki ptal |
cfa3d14 to
e221941
Compare
This allows us to drop the `//go:generate` and use of the github.com/mjibson/esc
utility.
worth noting that Go's native "embed" does not compress files. We could compress
these files as part of a build / validate step (which would add some complexity
when updating these files) if this is a concern, but not sure if the additional
complexity is warranted.
Comparing before/after sizes (see below);
macOS: 54125840 - 54005264 = 120576 (+120.58 kB)
Linux: 52393231 - 52277701 = 115530 (+115.53 kB)
Before:
ls -l build/
total 208736
lrwxr-xr-x 1 sebastiaan staff 19 Aug 15 09:36 docker@ -> docker-linux-amd64
-rwxr-xr-x 1 sebastiaan staff 54005264 Aug 15 09:35 docker-darwin-amd64*
-rwxr-xr-x 1 sebastiaan staff 52277701 Aug 15 09:36 docker-linux-amd64*
After:
ls -l build/
total 208960
lrwxr-xr-x 1 sebastiaan staff 18 Aug 15 09:32 docker@ -> docker-linux-amd64
-rwxr-xr-x 1 sebastiaan staff 54125840 Aug 15 09:31 docker-darwin-amd64*
-rwxr-xr-x 1 sebastiaan staff 52393231 Aug 15 09:32 docker-linux-amd64*
Signed-off-by: Sebastiaan van Stijn <[email protected]>
e221941 to
818564a
Compare
silvin-lubecki
approved these changes
Aug 16, 2021
Contributor
silvin-lubecki
left a comment
There was a problem hiding this comment.
LGTM, I'm glad we removed the dependency on ESC tool 👍
Member
Author
Yes, I love the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows us to drop the
//go:generateand use of the github.com/mjibson/esc utility.worth noting that Go's native "embed" does not compress files. We could compress these files as part of a build / validate step (which would add some complexity when updating these files) if this is a concern, but not sure if the additional complexity is warranted.
Comparing before/after sizes (see below);
Before:
After:
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)