Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multi-parameter println spacing #228

Merged
merged 1 commit into from Apr 8, 2024

Conversation

klauspost
Copy link
Contributor

@klauspost klauspost commented Apr 8, 2024

fmt.Println will add spaces between elements when there is multiple parameters sent. This is also described in the documentation of this library: Spaces are always added between operands and a newline is appended.

When wrapping the colors parameters were combined using fmt.Sprint(a...) - which does not space out parameters.

Use fmt.Sprintln to combine parameters.

Fixes #218

`fmt.Println` will add spaces between elements when there is multiple parameters sent.

When wrapping the colors parameters were combined using `fmt.Sprint(a...)` - which does not space out parameters.

Use `fmt.Sprintln` to combine parameters.

Fixes fatih#218
@fatih fatih merged commit b6598b1 into fatih:main Apr 8, 2024
1 check passed
@fatih
Copy link
Owner

fatih commented Apr 8, 2024

Thank you @klauspost for the fix. How important is a release for you? I was planning to wait a few weeks before releasing a new version.

@klauspost klauspost deleted the fix-println-issue-218 branch April 8, 2024 12:12
@klauspost
Copy link
Contributor Author

@fatih Not very, as it is cosmetic. I can always pin the master commit. Feel free to keep it for the RGB release.

@fatih
Copy link
Owner

fatih commented Apr 8, 2024

Got it, thank you again. Feel free to ping me If I forgot the release.

@klauspost
Copy link
Contributor Author

@fatih Gentle ping.

@fatih
Copy link
Owner

fatih commented May 13, 2024

@klauspost, thanks for the ping. Released a new version https://github.com/fatih/color/releases/tag/v1.17.0

renovate bot added a commit to anoriqq/qpm that referenced this pull request May 13, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/fatih/color](https://togithub.com/fatih/color) | `v1.16.0`
-> `v1.17.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2ffatih%2fcolor/v1.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2ffatih%2fcolor/v1.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2ffatih%2fcolor/v1.16.0/v1.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2ffatih%2fcolor/v1.16.0/v1.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>fatih/color (github.com/fatih/color)</summary>

### [`v1.17.0`](https://togithub.com/fatih/color/releases/tag/v1.17.0)

[Compare
Source](https://togithub.com/fatih/color/compare/v1.16.0...v1.17.0)

#### What's Changed

- Fix multi-parameter println spacing by
[@&#8203;klauspost](https://togithub.com/klauspost) in
[fatih/color#228
- ci: update Go and Staticcheck versions by
[@&#8203;fatih](https://togithub.com/fatih) in
[fatih/color#222
- Bump golang.org/x/sys from 0.14.0 to 0.17.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[fatih/color#221
- Bump actions/setup-go from 4 to 5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[fatih/color#217
- Bump golang.org/x/sys from 0.17.0 to 0.18.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[fatih/color#224

#### New Contributors

- [@&#8203;klauspost](https://togithub.com/klauspost) made their first
contribution in
[fatih/color#228

**Full Changelog**:
fatih/color@v1.16.0...v1.17.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log [here](https://developer.mend.io/github/anoriqq/qpm).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM1MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
jooola pushed a commit to hetznercloud/cli that referenced this pull request May 13, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/fatih/color](https://togithub.com/fatih/color) | `v1.16.0`
-> `v1.17.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2ffatih%2fcolor/v1.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2ffatih%2fcolor/v1.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2ffatih%2fcolor/v1.16.0/v1.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2ffatih%2fcolor/v1.16.0/v1.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>fatih/color (github.com/fatih/color)</summary>

### [`v1.17.0`](https://togithub.com/fatih/color/releases/tag/v1.17.0)

[Compare
Source](https://togithub.com/fatih/color/compare/v1.16.0...v1.17.0)

#### What's Changed

- Fix multi-parameter println spacing by
[@&#8203;klauspost](https://togithub.com/klauspost) in
[fatih/color#228
- ci: update Go and Staticcheck versions by
[@&#8203;fatih](https://togithub.com/fatih) in
[fatih/color#222
- Bump golang.org/x/sys from 0.14.0 to 0.17.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[fatih/color#221
- Bump actions/setup-go from 4 to 5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[fatih/color#217
- Bump golang.org/x/sys from 0.17.0 to 0.18.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[fatih/color#224

#### New Contributors

- [@&#8203;klauspost](https://togithub.com/klauspost) made their first
contribution in
[fatih/color#228

**Full Changelog**:
fatih/color@v1.16.0...v1.17.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/hetznercloud/cli).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM1MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

Documentation lies about Println
2 participants