8000 Use strings.Cut in a few places by JRaspass · Pull Request #971 · go-chi/chi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use strings.Cut in a few places #971

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

Merged
merged 1 commit into from
Feb 4, 2025
Merged

Conversation

JRaspass
Copy link
Contributor
@JRaspass JRaspass commented Feb 4, 2025

Now that we're 1.20+ instead of 1.14+ we can use 1.18's strings.Cut in a few places to simplify code.

Now that we're 1.20+ instead of 1.14+ we can use 1.18's strings.Cut in a
few places to simplify code.
Copy link
Contributor
@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

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

LGTM. Nice work!

Copy link
@david-littlefarmer david-littlefarmer left a comment

Choose a reason for hiding this comment

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

LGTM

@VojtechVitek VojtechVitek merged commit 877e876 into go-chi:master Feb 4, 2025
8 checks passed
saschazepter pushed a commit to saschazepter/forgejo that referenced this pull request Jun 21, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/go-chi/chi/v5](https://github.com/go-chi/chi) | require | patch | `v5.2.1` -> `v5.2.2` |

---

### Release Notes

<details>
<summary>go-chi/chi (github.com/go-chi/chi/v5)</summary>

### [`v5.2.2`](https://github.com/go-chi/chi/releases/tag/v5.2.2)

[Compare Source](go-chi/chi@v5.2.1...v5.2.2)

#### What's Changed

- Use strings.Cut in a few places by [@&#8203;JRaspass](https://github.com/JRaspass) in go-chi/chi#971
- Fix non-constant format strings in t.Fatalf by [@&#8203;JRaspass](https://github.com/JRaspass) in go-chi/chi#972
- Apply fieldalignment fixes to optimize struct memory layout by [@&#8203;pixel365](https://github.com/pixel365) in go-chi/chi#974
- go 1.24 by [@&#8203;pkieltyka](https://github.com/pkieltyka) in go-chi/chi#977
- chore: delint ioutil usage by [@&#8203;costela](https://github.com/costela) in go-chi/chi#962
- Fixed typo in Router interface definition by [@&#8203;mithileshgupta12](https://github.com/mithileshgupta12) in go-chi/chi#958
- Add support for TinyGo by [@&#8203;efraimbart](https://github.com/efraimbart) in go-chi/chi#978
- Exclude middleware/profiler.go in TinyGo, as there's no net/http/pprof pkg by [@&#8203;cxjava](https://github.com/cxjava) in go-chi/chi#982
- Make use of strings.Cut by [@&#8203;scop](https://github.com/scop) in go-chi/chi#1005
- Change install command format to code block by [@&#8203;sglkc](https://github.com/sglkc) in go-chi/chi#1001
- Correct documentation by [@&#8203;mrdomino](https://github.com/mrdomino) in go-chi/chi#992

#### Security fix

- Fixes [GHSA-vrw8-fxc6-2r93](GHSA-vrw8-fxc6-2r93) - "Host Header Injection Leads to Open Redirect in RedirectSlashes" [commit](go-chi/chi@1be7ad9)
  - a lower-severity Open Redirect that can't be exploited in browser or email client, as it requires manipulation of a Host header
  - reported by Anuraag Baishya, [@&#8203;anuraagbaishya](https://github.com/anuraagbaishya). Thank you!

#### New Contributors

- [@&#8203;pixel365](https://github.com/pixel365) made their first contribution in go-chi/chi#974
- [@&#8203;mithileshgupta12](https://github.com/mithileshgupta12) made their first contribution in go-chi/chi#958
- [@&#8203;efraimbart](https://github.com/efraimbart) made their first contribution in go-chi/chi#978
- [@&#8203;cxjava](https://github.com/cxjava) made their first contribution in go-chi/chi#982
- [@&#8203;sglkc](https://github.com/sglkc) made their first contribution in go-chi/chi#1001
- [@&#8203;mrdomino](https://github.com/mrdomino) made their first contribution in go-chi/chi#992

**Full Changelog**: go-chi/chi@v5.2.1...v5.2.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC41Ny4xIiwidXBkYXRlZEluVmVyIjoiNDAuNTcuMSIsInRhcmdldEJyYW5jaCI6ImZvcmdlam8iLCJsYWJlbHMiOlsiZGVwZW5kZW5jeS11cGdyYWRlIiwidGVzdC9ub3QtbmVlZGVkIl19-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8248
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
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.

3 participants
0