Skip to content

cli/command: fix deprecation comments for Stream types - #4152

Merged
thaJeztah merged 1 commit into
docker:masterfrom
thaJeztah:fix_deprecation_message
Apr 3, 2023
Merged

cli/command: fix deprecation comments for Stream types#4152
thaJeztah merged 1 commit into
docker:masterfrom
thaJeztah:fix_deprecation_message

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

These were deprecated in 6c400a9 (docker 19.03), but the "Deprecated:" comments were missing a newline before them.

While most IDEs will detect such comments as "deprecated", pkg.go.dev and linters will ignore them, which may result in users not being aware of them being deprecated.

This patch;

  • Fixes the "Deprecated:" comments.
  • Changes the var aliases to functions, which is slightly more boilerplating, but makes sure the functions are documented as "function", instead of shown in the "variables" section on pkg.go.dev.
  • Adds some punctuation and adds "doc links", which allows readers to navigate to related content on pkg.go.dev.

Before this patch:

https://pkg.go.dev/github.com/docker/cli@v24.0.0-beta.1+incompatible/cli/command#InStream

Screenshot 2023-04-01 at 17 46 10

With this patch:

Screenshot 2023-04-01 at 18 11 12

Screenshot 2023-04-01 at 18 15 04

Screenshot 2023-04-01 at 18 33 25

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

These were deprecated in 6c400a9 (docker 19.03),
but the "Deprecated:" comments were missing a newline before them.
While most IDEs will detect such comments as "deprecated", pkg.go.dev and linters
will ignore them, which may result in users not being aware of them being deprecated.
This patch;
- Fixes the "Deprecated:" comments.
- Changes the var aliases to functions, which is slightly more boilerplating,
but makes sure the functions are documented as "function", instead of shown
in the "variables" section on pkg.go.dev.
- Adds some punctuation and adds "doc links", which allows readers to navigate
to related content on pkg.go.dev.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@codecov-commenter

codecov-commenter commented Apr 1, 2023

Copy link
Copy Markdown

Codecov Report

Merging #4152 (817897f) into master (a0756c3) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Additional details and impacted files
@@ Coverage Diff @@## master #4152 +/- ##
==========================================
- Coverage 59.03% 59.02% -0.01% 
==========================================
Files 287 288 +1 Lines 24767 24771 +4 ==========================================
Hits 14620 14620 - Misses 9264 9268 +4 
Partials 883 883 

@thaJeztah

Copy link
Copy Markdown
MemberAuthor

Thx! Let me bring this one in

@thaJeztah
thaJeztah merged commit 777a2ed into docker:masterApr 3, 2023
@thaJeztah
thaJeztah deleted the fix_deprecation_message branch April 3, 2023 09:18
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@thaJeztah@codecov-commenter@vvoland