Skip to content

Simplify runnable naming and add FuncNamed - #48

Merged
pior merged 1 commit into
masterfrom
naming
Feb 8, 2026
Merged

Simplify runnable naming and add FuncNamed#48
pior merged 1 commit into
masterfrom
naming

Conversation

@pior

@pior pior commented Feb 7, 2026

Copy link
Copy Markdown
Owner
  • Simplify naming: Remove findName chain-walking, baseWrapper struct,
    and RunnableName/RunnableUnwrap implicit interfaces. Wrappers now
    compose a name string at construction time using a single unexported
    runnableName() helper with reflection fallback.
  • Add FuncNamed(name, fn): Lets users name function runnables explicitly,
    solving the problem of multiple Func() instances being indistinguishable
    in logs.
  • Add ManagerName option: Customize the manager's name in logs
    (defaults to "manager").
  • Func() uses runtime.FuncForPC: Auto-detects meaningful function names
    instead of showing the generic type name.
  • Update README: Fix stale Manager(nil)NewManager(), update log
    output examples to slog format.

Base automatically changed from slog to master February 8, 2026 10:54
@pior
pior merged commit 8e46022 into master Feb 8, 2026
2 checks passed
@pior
pior deleted the naming branch February 8, 2026 10:54
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.

1 participant