Skip to content

[23.0 backport] cli/command: fix deprecation comments for Stream types - #4154

Merged
thaJeztah merged 1 commit into
docker:23.0from
thaJeztah:23.0_backport_fix_deprecation_message
Apr 5, 2023
Merged

[23.0 backport] cli/command: fix deprecation comments for Stream types#4154
thaJeztah merged 1 commit into
docker:23.0from
thaJeztah:23.0_backport_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>
(cherry picked from commit 817897f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #4154 (6efc4ea) into 23.0 (3e7cbfd) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Additional details and impacted files
@@ Coverage Diff @@## 23.0 #4154 +/- ##
==========================================
- Coverage 59.14% 59.13% -0.01% 
==========================================
Files 287 288 +1 Lines 24741 24745 +4 ==========================================
Hits 14634 14634 - Misses 9221 9225 +4 
Partials 886 886 

@thaJeztah
thaJeztah marked this pull request as ready for review April 3, 2023 09:19
@thaJeztahthaJeztah modified the milestones: 23.0.3, 23.0.4Apr 4, 2023
@thaJeztah

Copy link
Copy Markdown
MemberAuthor

@rumpl@vvoland ptal

@thaJeztah
thaJeztah merged commit 06ab599 into docker:23.0Apr 5, 2023
@thaJeztah
thaJeztah deleted the 23.0_backport_fix_deprecation_message branch April 5, 2023 15:02
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