Add String method to all interfaces
This commit is contained in:
@@ -76,6 +76,10 @@ func (n *dcSelector) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *dcSelector) String() string {
|
||||
return "dc"
|
||||
}
|
||||
|
||||
// Return a new first node selector
|
||||
func DCSelector(opts ...selector.Option) selector.Selector {
|
||||
var sopts selector.Options
|
||||
|
@@ -66,6 +66,10 @@ func (n *firstNodeSelector) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *firstNodeSelector) String() string {
|
||||
return "first"
|
||||
}
|
||||
|
||||
// Return a new first node selector
|
||||
func FirstNodeSelector(opts ...selector.Option) selector.Selector {
|
||||
var sopts selector.Options
|
||||
|
Reference in New Issue
Block a user