Skip to content

Conversation

@tongjicoder
Copy link
Contributor

What I did

There is a new function added in the go1.21 standard library, which can make the code more concise and easy to read.

Related issue

(not mandatory) A picture of a cute animal, if possible in relation to what you did

image

@tongjicoder tongjicoder requested a review from a team as a code owner May 27, 2025 06:51
@tongjicoder tongjicoder requested review from glours and ndeloof May 27, 2025 06:51
@ndeloof
Copy link
Contributor

ndeloof commented May 27, 2025

you could go one step further and remove the StringContains function, replacing with this newer func from stdlib

@tongjicoder
Copy link
Contributor Author

you could go one step further and remove the StringContains function, replacing with this newer func from stdlib

Good idea. Modified.

Please review again.

Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

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

Sounds good to me! Thanks for your contribution 🙏
Waiting for green CI to merge it

@tongjicoder
Copy link
Contributor Author

Sounds good to me! Thanks for your contribution 🙏 Waiting for green CI to merge it

Sorry, it looks like I missed one place.

36.44 # github.com/docker/compose/v2/pkg/api
36.44 pkg/api/api.go:178:50: undefined: utils.StringContains
36.44 pkg/api/api.go:184:50: undefined: utils.StringContains

@tongjicoder
Copy link
Contributor Author

It seems that the new IDE I switched to doesn't automatically save changes, which caused the issue.

I've made the modifications now. Please approve the CI again.

@ndeloof ndeloof merged commit 2e71440 into docker:main May 27, 2025
26 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jun 12, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [docker/compose](https://github.com/docker/compose) | minor | `v2.36.2` -> `v2.37.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>docker/compose (docker/compose)</summary>

### [`v2.37.1`](https://github.com/docker/compose/releases/tag/v2.37.1)

[Compare Source](docker/compose@v2.37.0...v2.37.1)

#### What's Changed

##### ✨ Improvements

-   Add support for extra_hosts building with bake by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12935

##### 🐛 Fixes

-   Fix SIGSEGV on Enable Watch by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12909
-   Revert docker compose images JSON output to array format by [@&#8203;x0rw](https://github.com/x0rw) in docker/compose#12917
-   Sanitize service name so they can be used as bake targets by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12925
-   Only look for required image in bake metadata by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12930
-   Don't create metadatafile, just generate a random name by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12931
-   Fix the generated manifest for compose artifacts by [@&#8203;jcarter3](https://github.com/jcarter3) in docker/compose#12933
-   Fix support for additional_contexts with service sub-dependencies by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12936
-   Fix panic on failure starting plugin server by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12914

##### 🔧  Internal

-   Do not forget to remove the bake metadata file by [@&#8203;glours](https://github.com/glours) in docker/compose#12912

##### ⚙️ Dependencies

-   Bump golang.org/x/sync v0.15.0 by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12913
-   Build(deps): bump google.golang.org/grpc from 1.72.2 to 1.73.0 by [@&#8203;dependabot](https://github.com/dependabot) in docker/compose#12910

#### New Contributors

-   [@&#8203;x0rw](https://github.com/x0rw) made their first contribution in docker/compose#12917
-   [@&#8203;jcarter3](https://github.com/jcarter3) made their first contribution in docker/compose#12933

**Full Changelog**: docker/compose@v2.37.0...v2.37.1

### [`v2.37.0`](https://github.com/docker/compose/releases/tag/v2.37.0)

[Compare Source](docker/compose@v2.36.2...v2.37.0)

#### What's Changed

ℹ️ `bake` is now used as the default images builder, if you don't want to use it you could opt-out by setting the `COMPOSE_BAKE` env variable to `false`

##### ✨ Improvements

-   Add compose bridge by [@&#8203;glours](https://github.com/glours) in docker/compose#12866
-   Include platform and creation date listing image by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12856
-   Add support of metadata subcommand for provider services by [@&#8203;glours](https://github.com/glours) in docker/compose#12903
-   Use bake by default by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12699

##### 🐛 Fixes

-   (Re)start dependent services after watch rebuilt image by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12879
-   Resolve symlinks while making dockerfile path absolute by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12884
-   Fix support for `BUILDKIT_PROGRESS` by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12894
-   Build dependent service images when required by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12896
-   Fix recreate network (and connected containers) on config updates by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12899
-   `pull` does not require `env_file` being resolved by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12904

##### 🔧  Internal

-   Refactor: use slices.Contains to simplify code by [@&#8203;tongjicoder](https://github.com/tongjicoder) in docker/compose#12877
-   Remove utils.Contains to prefer slice.ContainsFunc by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12878
-   Fix typo in suggestion log by [@&#8203;Carlos-err406](https://github.com/Carlos-err406) in docker/compose#12893
-   Replace uses of golang.org/x/exp/(maps|slices) for stdlib and fix linting by [@&#8203;thaJeztah](https://github.com/thaJeztah) in docker/compose#12885
-   Debug message to help diagnose platform mismatch by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12905
-   (refactoting) Move watch logic into a dedicated Watcher type by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12865

##### ⚙️ Dependencies

-   Bump cli-doc-tools to v0.10.0 by [@&#8203;glours](https://github.com/glours) in docker/compose#12855
-   Bump github.com/docker/docker, docker/cli v28.2.2 by [@&#8203;thaJeztah](https://github.com/thaJeztah) in docker/compose#12875
-   Build(deps): bump google.golang.org/grpc from 1.72.1 to 1.72.2 by [@&#8203;dependabot](https://github.com/dependabot) in docker/compose#12872

#### New Contributors

-   [@&#8203;tongjicoder](https://github.com/tongjicoder) made their first contribution in docker/compose#12877
-   [@&#8203;Carlos-err406](https://github.com/Carlos-err406) made their first contribution in docker/compose#12893

**Full Changelog**: docker/compose@v2.36.2...v2.37.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 MR becomes conflicted, or you tick the rebase/retry checkbox.

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

---

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

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC41MC4wIiwidXBkYXRlZEluVmVyIjoiNDAuNTAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
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