Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Follow-up: finish the goos refactor and harden callLog's zero-arg case

Open Beginner friendly
#1,106 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
go
Domain
cli, testing

Research direction

Look at cmd_service.go for the functions serviceIsCurrent and reportInstallSuccess to see where they still branch on goos internally. Also examine cmd_service_systemd_test.go's callLog helper to understand its current echo "$@" behavior. The goal is to refactor the goos branching to use the passed parameter and change callLog to output a distinguishable string even for zero arguments. Run the existing service tests to ensure changes don't break anything.

Written by the indexing model from the issue text.

Description

Context

Two follow-up items surfaced during review of #1080 (the fakeSystemctl/fakeLoginctl test harness), both explicitly noted by the reviewer as out of scope for that PR:

Items
  • serviceIsCurrent (cmd_service.go) and reportInstallSuccess (cmd_service.go:498) already receive goos/runtime.GOOS as a parameter but still branch on it internally in places, the same pattern loadService/controlService/supervisorRunning/unloadService had before #1080's refactor. Their darwin-only and linux-only logic still can't be exercised from the other host. Second half of the same refactor #1080 did for the other four functions.
  • cmd_service_systemd_test.go's callLog helper writes echo "$@" to the log file; a zero-argument invocation would append a blank line, which readCallLog filters out as empty — making a real (bugged) zero-argument call indistinguishable from a genuine "never called" outcome. Latent only: no real call site in the current code passes zero arguments, so nothing exercises this today. Worth hardening (e.g. echo "argv: $@") before it silently matters.
Additional Context

Both found during the #1076/#1080 review cycle for #945 (Linux install and systemd service lifecycle verification). Neither blocks anything currently shipped; low priority.

Dominant language
Go
Stars
13
Forks
40
Avg merge
12h 17m
Merged PRs (30d)
187

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rossoctl/cortex

All issues in rossoctl/cortex

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.