Open silviucm opened 6 years ago
Hi @roylee17 - when you have a chance could you review this ? if approved, I would go on and fix the write part of the blesh tool
@silviucm sorry for the late response.
Thanks for the input. The implementation looks good to me if these are internal utility functions. But, since these broaden the API too much, do you want to take on another direction?
Something like how Sort package works.
// (details or naming are left out)
type interface xxFinder {
Find( XXX ) interface {}
}
type ByHandle struct { }
func (f *ByHandle) Find ( XXX ) interface{} {
}
type ByUUID struct { }
func (f *ByUUID) Find ( XXX ) interface{} {
}
func FindBy( f xxFinder) interface {} {
// Traverse svcs, chars, descs, ... and see if f apply
}
@roylee17 fair enough. Changes updated
LGTM, thanks.
@roylee17 if you could approve this merge at your convenience, I could get going on the second part, fixing the blesh tool write part + a bit of documentation for it
thanks
ping @hasty
This pull request adds several convenience methods for identifying services, characteristics or descriptors, based on their uuid or handle, in addition to the original Find method.