Skip to content

Use UID instead of username for systemctl machine#531

Merged
dmitry-lyfar merged 1 commit into
mainfrom
fix/systemctl-machine-uid
Nov 8, 2025
Merged

Use UID instead of username for systemctl machine#531
dmitry-lyfar merged 1 commit into
mainfrom
fix/systemctl-machine-uid

Conversation

@jonathan-conder
Copy link
Copy Markdown
Contributor

Description

The previous command fails for nonstandard usernames like email addresses.

Self-review quick check

  • Make decisions that cost a lot to reverse explicit in the PR description.
  • Avoid nested conditions.
  • Delete dead code and redundant comments.
  • Normalise symmetries by sticking to doing identical things identically.
// one way to handle errors
if err := f(); err != nil {
   ...
}

// one way to handle multiple returns
val, err := f()
if err != nil {
   ...
}
...
  • Check that coupled code elements, files, and directories are adjacent. For example, test data is stored as close as possible to a test.
  • Put variable declaration and initialisation together.
  • Divide large expressions into digestable and self-explanatory ones. Use multiple variables if required.
  • Put a blank line between two logically different chunks of code.
  • Follow the style guide for new error messages.

Docs

  • I have checked and added or updated relevant documentation.
  • I have checked and added or updated relevant release notes.
  • I have included the technical author in the review.

Or:

  • I confirm the PR has no implications for documentation.

The previous command fails for nonstandard usernames like email
addresses.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 8, 2025

TICS Quality Gate

✔️ Passed

workshop

Coding Standards: ✔️ Passed

✔️ Condition “No new Coding Standard Violations for level 1, 2, 3 with respect to Previous analysis” passed.

See the results in the TICS Viewer

The following files have been checked for this project
  • internal/osutil/user.go

Automatic-tests / code-coverage / TICS GitHub Action

@dmitry-lyfar dmitry-lyfar merged commit bd306d0 into main Nov 8, 2025
34 of 38 checks passed
@dmitry-lyfar dmitry-lyfar deleted the fix/systemctl-machine-uid branch November 8, 2025 08:58
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