Skip to content

Add Version() #175

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

MarcinKonowalczyk
Copy link

Exposed the 'version' call from ping as a method on Client

@MarcinKonowalczyk MarcinKonowalczyk changed the title Feature/version Add Version() Apr 7, 2024
@MarcinKonowalczyk
Copy link
Author

@bradfitz bump, although you do seem like a busy person.. 🤷‍♀️

@dormando
Copy link
Collaborator

dormando commented Apr 4, 2025

This seems kinda nice but does need to be cleaned up. @MarcinKonowalczyk - this PR isn't super ancient so if you're up for addressing the review comment please do so. Else we'll look into it.

@MarcinKonowalczyk
Copy link
Author

ty for the poke! addressed and rebased on top of master. let me know what you think.

ive changed the functionality to VersionAll and Version(key string) and added docs (but if you think it ought to be only one function, i'm more than happy to change it back.

also something to specifically point out: i think the behaviour of VersionAll ought to be to return empty strings for unconnected instances. the rationale being that just because one instance is not connected ought not to stop one learning about other instances. having said that, there is an argument to be made for a simpler api: just one Version function which just checks all instances and errors out if any is not connected. just thoughts though. again, happy to change it to anything you'd like. 👍

@MarcinKonowalczyk
Copy link
Author

oh, also i;ve made a tiny clarification to doc of Each and added a static type assertion which makes the code a bit more readable. can split it into a separate PR but i thought it minor enough to stick here.

@dormando dormando added this to the Small protocol issues milestone Apr 4, 2025
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.

3 participants