Skip to content

Don't pass around a pointer to service.#209

Open
jholdstock wants to merge 2 commits into
decred:masterfrom
jholdstock:no-pointer
Open

Don't pass around a pointer to service.#209
jholdstock wants to merge 2 commits into
decred:masterfrom
jholdstock:no-pointer

Conversation

@jholdstock
Copy link
Copy Markdown
Member

@jholdstock jholdstock commented May 26, 2026

It makes more sense for the functions to be methods of the service, rather than accepting the service as a param.

It makes more sense for the functions to be methods of the service,
rather than accepting the service as a param.
Copy link
Copy Markdown
Member

@davecgh davecgh left a comment

Choose a reason for hiding this comment

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

Nice update overall. It is cleaner to have the methods on the type and more customary to use a short name for receiver.

Comment thread service.go Outdated
Comment thread service.go Outdated
- Embed Mutex in struct to make it less verbose to use.
- Avoid an extra lock by passing Vsp into vspStats as a param.
- Add a missing lock in vspData.
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