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

Update string.go #496

Merged
merged 2 commits into from
Jul 17, 2024
Merged

Update string.go #496

merged 2 commits into from
Jul 17, 2024

Conversation

liujundezhanghao
Copy link
Contributor

more reasonable

more reasonable
@ccoVeille
Copy link
Contributor

Could you please add test for this use case?

It's unclear what you are fixing, and someone could open a PR and make the opposite changes

@liujundezhanghao
Copy link
Contributor Author

liujundezhanghao commented Jul 17, 2024

Because if the offsets are equal in size, the following logic is meaningless.I think it's just optimization,not fix

@ccoVeille
Copy link
Contributor

ccoVeille commented Jul 17, 2024

So, the test was already there?

@liujundezhanghao
Copy link
Contributor Author

Thanks, I added it

@ccoVeille
Copy link
Contributor

Thanks for doing the changes. Let's wait for maintainers feedback now

@samber
Copy link
Owner

samber commented Jul 17, 2024

👌 Good point

@samber samber merged commit 1ca9c7b into samber:master Jul 17, 2024
7 checks passed
mx-psi referenced this pull request in open-telemetry/opentelemetry-collector-contrib Aug 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/samber/lo](https://togithub.com/samber/lo) | `v1.46.0` ->
`v1.47.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fsamber%2flo/v1.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fsamber%2flo/v1.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fsamber%2flo/v1.46.0/v1.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fsamber%2flo/v1.46.0/v1.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>samber/lo (github.com/samber/lo)</summary>

### [`v1.47.0`](https://togithub.com/samber/lo/releases/tag/v1.47.0)

[Compare
Source](https://togithub.com/samber/lo/compare/v1.46.0...v1.47.0)

#### What's Changed

- feat: Improve Substring by
[@&#8203;liujundezhanghao](https://togithub.com/liujundezhanghao) in
[https://github.com/samber/lo/pull/496](https://togithub.com/samber/lo/pull/496)
- doc: Wrong method reference and output in readme by
[@&#8203;ColeZia](https://togithub.com/ColeZia) in
[https://github.com/samber/lo/pull/497](https://togithub.com/samber/lo/pull/497)
- doc: Fix documentation for Duration3 by
[@&#8203;gecko655](https://togithub.com/gecko655) in
[https://github.com/samber/lo/pull/502](https://togithub.com/samber/lo/pull/502)
- feat: add FromSlicePtr by [@&#8203;mash](https://togithub.com/mash) in
[https://github.com/samber/lo/pull/217](https://togithub.com/samber/lo/pull/217)
- feat: adding FromSlicePtrOr by
[@&#8203;samber](https://togithub.com/samber) in
[https://github.com/samber/lo/pull/506](https://togithub.com/samber/lo/pull/506)
- feat: Keys+Values: accept multiple maps (vaargs) - Adding
UniqKeys+UniqValues by
[@&#8203;shivamrazorpay](https://togithub.com/shivamrazorpay) in
[https://github.com/samber/lo/pull/503](https://togithub.com/samber/lo/pull/503)
- doc: Update foreachwhile readme.md by
[@&#8203;Sianao](https://togithub.com/Sianao) in
[https://github.com/samber/lo/pull/508](https://togithub.com/samber/lo/pull/508)

#### New Contributors

- [@&#8203;liujundezhanghao](https://togithub.com/liujundezhanghao) made
their first contribution in
[https://github.com/samber/lo/pull/496](https://togithub.com/samber/lo/pull/496)
- [@&#8203;ColeZia](https://togithub.com/ColeZia) made their first
contribution in
[https://github.com/samber/lo/pull/497](https://togithub.com/samber/lo/pull/497)
- [@&#8203;gecko655](https://togithub.com/gecko655) made their first
contribution in
[https://github.com/samber/lo/pull/502](https://togithub.com/samber/lo/pull/502)
- [@&#8203;mash](https://togithub.com/mash) made their first
contribution in
[https://github.com/samber/lo/pull/217](https://togithub.com/samber/lo/pull/217)
- [@&#8203;shivamrazorpay](https://togithub.com/shivamrazorpay) made
their first contribution in
[https://github.com/samber/lo/pull/503](https://togithub.com/samber/lo/pull/503)

**Full Changelog**:
samber/lo@v1.46.0...v1.47.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), 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 was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIiwicmVub3ZhdGVib3QiXX0=-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
github-actions bot referenced this pull request in kairos-io/provider-kairos Aug 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/samber/lo](https://togithub.com/samber/lo) | `v1.46.0` ->
`v1.47.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fsamber%2flo/v1.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fsamber%2flo/v1.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fsamber%2flo/v1.46.0/v1.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fsamber%2flo/v1.46.0/v1.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>samber/lo (github.com/samber/lo)</summary>

### [`v1.47.0`](https://togithub.com/samber/lo/releases/tag/v1.47.0)

[Compare
Source](https://togithub.com/samber/lo/compare/v1.46.0...v1.47.0)

#### What's Changed

- feat: Improve Substring by
[@&#8203;liujundezhanghao](https://togithub.com/liujundezhanghao) in
[https://github.com/samber/lo/pull/496](https://togithub.com/samber/lo/pull/496)
- doc: Wrong method reference and output in readme by
[@&#8203;ColeZia](https://togithub.com/ColeZia) in
[https://github.com/samber/lo/pull/497](https://togithub.com/samber/lo/pull/497)
- doc: Fix documentation for Duration3 by
[@&#8203;gecko655](https://togithub.com/gecko655) in
[https://github.com/samber/lo/pull/502](https://togithub.com/samber/lo/pull/502)
- feat: add FromSlicePtr by [@&#8203;mash](https://togithub.com/mash) in
[https://github.com/samber/lo/pull/217](https://togithub.com/samber/lo/pull/217)
- feat: adding FromSlicePtrOr by
[@&#8203;samber](https://togithub.com/samber) in
[https://github.com/samber/lo/pull/506](https://togithub.com/samber/lo/pull/506)
- feat: Keys+Values: accept multiple maps (vaargs) - Adding
UniqKeys+UniqValues by
[@&#8203;shivamrazorpay](https://togithub.com/shivamrazorpay) in
[https://github.com/samber/lo/pull/503](https://togithub.com/samber/lo/pull/503)
- doc: Update foreachwhile readme.md by
[@&#8203;Sianao](https://togithub.com/Sianao) in
[https://github.com/samber/lo/pull/508](https://togithub.com/samber/lo/pull/508)

#### New Contributors

- [@&#8203;liujundezhanghao](https://togithub.com/liujundezhanghao) made
their first contribution in
[https://github.com/samber/lo/pull/496](https://togithub.com/samber/lo/pull/496)
- [@&#8203;ColeZia](https://togithub.com/ColeZia) made their first
contribution in
[https://github.com/samber/lo/pull/497](https://togithub.com/samber/lo/pull/497)
- [@&#8203;gecko655](https://togithub.com/gecko655) made their first
contribution in
[https://github.com/samber/lo/pull/502](https://togithub.com/samber/lo/pull/502)
- [@&#8203;mash](https://togithub.com/mash) made their first
contribution in
[https://github.com/samber/lo/pull/217](https://togithub.com/samber/lo/pull/217)
- [@&#8203;shivamrazorpay](https://togithub.com/shivamrazorpay) made
their first contribution in
[https://github.com/samber/lo/pull/503](https://togithub.com/samber/lo/pull/503)

**Full Changelog**:
samber/lo@v1.46.0...v1.47.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 11pm every weekday,before 7am
every weekday,every weekend" in timezone Europe/Brussels, 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 was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/kairos-io/provider-kairos).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
f7o referenced this pull request in f7o/opentelemetry-collector-contrib Sep 12, 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/samber/lo](https://togithub.com/samber/lo) | `v1.46.0` ->
`v1.47.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fsamber%2flo/v1.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fsamber%2flo/v1.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fsamber%2flo/v1.46.0/v1.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fsamber%2flo/v1.46.0/v1.47.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>samber/lo (github.com/samber/lo)</summary>

### [`v1.47.0`](https://togithub.com/samber/lo/releases/tag/v1.47.0)

[Compare
Source](https://togithub.com/samber/lo/compare/v1.46.0...v1.47.0)

#### What's Changed

- feat: Improve Substring by
[@&open-telemetry#8203;liujundezhanghao](https://togithub.com/liujundezhanghao) in
[https://github.com/samber/lo/pull/496](https://togithub.com/samber/lo/pull/496)
- doc: Wrong method reference and output in readme by
[@&open-telemetry#8203;ColeZia](https://togithub.com/ColeZia) in
[https://github.com/samber/lo/pull/497](https://togithub.com/samber/lo/pull/497)
- doc: Fix documentation for Duration3 by
[@&open-telemetry#8203;gecko655](https://togithub.com/gecko655) in
[https://github.com/samber/lo/pull/502](https://togithub.com/samber/lo/pull/502)
- feat: add FromSlicePtr by [@&open-telemetry#8203;mash](https://togithub.com/mash) in
[https://github.com/samber/lo/pull/217](https://togithub.com/samber/lo/pull/217)
- feat: adding FromSlicePtrOr by
[@&open-telemetry#8203;samber](https://togithub.com/samber) in
[https://github.com/samber/lo/pull/506](https://togithub.com/samber/lo/pull/506)
- feat: Keys+Values: accept multiple maps (vaargs) - Adding
UniqKeys+UniqValues by
[@&open-telemetry#8203;shivamrazorpay](https://togithub.com/shivamrazorpay) in
[https://github.com/samber/lo/pull/503](https://togithub.com/samber/lo/pull/503)
- doc: Update foreachwhile readme.md by
[@&open-telemetry#8203;Sianao](https://togithub.com/Sianao) in
[https://github.com/samber/lo/pull/508](https://togithub.com/samber/lo/pull/508)

#### New Contributors

- [@&open-telemetry#8203;liujundezhanghao](https://togithub.com/liujundezhanghao) made
their first contribution in
[https://github.com/samber/lo/pull/496](https://togithub.com/samber/lo/pull/496)
- [@&open-telemetry#8203;ColeZia](https://togithub.com/ColeZia) made their first
contribution in
[https://github.com/samber/lo/pull/497](https://togithub.com/samber/lo/pull/497)
- [@&open-telemetry#8203;gecko655](https://togithub.com/gecko655) made their first
contribution in
[https://github.com/samber/lo/pull/502](https://togithub.com/samber/lo/pull/502)
- [@&open-telemetry#8203;mash](https://togithub.com/mash) made their first
contribution in
[https://github.com/samber/lo/pull/217](https://togithub.com/samber/lo/pull/217)
- [@&open-telemetry#8203;shivamrazorpay](https://togithub.com/shivamrazorpay) made
their first contribution in
[https://github.com/samber/lo/pull/503](https://togithub.com/samber/lo/pull/503)

**Full Changelog**:
samber/lo@v1.46.0...v1.47.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), 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 was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIiwicmVub3ZhdGVib3QiXX0=-->

---------

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

3 participants