Skip to content

Fix openstack/common/extension doc examples#2243

Merged
jtopjian merged 2 commits intogophercloud:masterfrom
shiftstack:fix-extensions-doc
Oct 25, 2021
Merged

Fix openstack/common/extension doc examples#2243
jtopjian merged 2 commits intogophercloud:masterfrom
shiftstack:fix-extensions-doc

Conversation

@mandre
Copy link
Copy Markdown
Contributor

@mandre mandre commented Oct 25, 2021

Fix calls to pagination.Pager.AllPages() in openstack/common/extension doc examples and also fix formatting error with fmt.Println().

For #2242

The doc example for `openstack/common/extension` would otherwise fail
compilation with:

    extensions.List(networkClient).Allpages undefined (type pagination.Pager has no field or method Allpages, but does have AllPages)
Some doc examples were wrongly calling `fmt.Println()` with a formatting
specifier instead of `fmt.Printf()`. This caused the examples to print
the literal string `%+v` with a new line before printing the argument
using its default format. This clears the following compilation warning:

    Println call has possible formatting directive %+v

Got all files with `ag "Println.+%"`.
@pierreprinetti
Copy link
Copy Markdown
Member

LGTM! 👍

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Oct 25, 2021

Build succeeded.

@EmilienM
Copy link
Copy Markdown
Contributor

LGTM

Copy link
Copy Markdown
Contributor

@jtopjian jtopjian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thank you!

@jtopjian jtopjian merged commit ecbce89 into gophercloud:master Oct 25, 2021
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 79.861% when pulling 240a726 on shiftstack:fix-extensions-doc into 754fd24 on gophercloud:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants