Skip to content

user: GetExecUser: use strings.Cut to split user:group#228

Merged
thaJeztah merged 1 commit into
moby:mainfrom
thaJeztah:user_cut
Jun 30, 2026
Merged

user: GetExecUser: use strings.Cut to split user:group#228
thaJeztah merged 1 commit into
moby:mainfrom
thaJeztah:user_cut

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

This was using parseParts to split the colon-separated strings, but this required both converting to a byte-slice, and an intermediate slice (split by colon).

Use strings.Cut, which makes it more transparent what's done and to reduce allocations.

This was using parseParts to split the colon-separated strings, but
this required both converting to a byte-slice, and an intermediate
slice (split by colon).

Use strings.Cut, which makes it more transparent what's done and to
reduce allocations.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah merged commit ba3de4c into moby:main Jun 30, 2026
20 checks passed
@thaJeztah thaJeztah deleted the user_cut branch June 30, 2026 10:55
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.

2 participants