Skip to content

NR-118428 feat: get process sample username w/o CGO #1675

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 2 commits into from
Jun 15, 2023

Conversation

rubenruizdegauna
Copy link
Contributor

No description provided.

@rubenruizdegauna rubenruizdegauna force-pushed the NR-118428_process_sample_user_wo_cgo branch 2 times, most recently from e323c26 to 6a65314 Compare June 14, 2023 08:41
@rubenruizdegauna rubenruizdegauna force-pushed the NR-118428_process_sample_user_wo_cgo branch 2 times, most recently from 84e8543 to 111422d Compare June 14, 2023 09:14
@rubenruizdegauna rubenruizdegauna force-pushed the NR-118428_process_sample_user_wo_cgo branch from 111422d to f3d402d Compare June 14, 2023 12:10
return "", errInvalidUidsForProcess //nolint:wrapcheck
}

return strconv.Itoa(int(uuids[0])), nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a nitpick, wdyt about returning the actual numeric representation here and do the conversion inside usernameForGetent? Returning a string representation could make other usages of this function unwieldy (figure a function that accepts some uid argument and needs to get the number back from the string repr before actually working with the value 😕 )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point 👍 . Changed in 8325d87

@rubenruizdegauna rubenruizdegauna force-pushed the NR-118428_process_sample_user_wo_cgo branch from 8325d87 to 17dae8a Compare June 14, 2023 14:17
Copy link
Contributor

@DavSanchez DavSanchez left a comment

Choose a reason for hiding this comment

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

LGTM! 🔥

@rubenruizdegauna rubenruizdegauna merged commit e7825d7 into master Jun 15, 2023
@rubenruizdegauna rubenruizdegauna deleted the NR-118428_process_sample_user_wo_cgo branch June 15, 2023 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants