add some String() to make codes easier to read and debug
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
package topology
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type VolumeLocationList struct {
|
||||
list []*DataNode
|
||||
}
|
||||
@@ -8,6 +12,10 @@ func NewVolumeLocationList() *VolumeLocationList {
|
||||
return &VolumeLocationList{}
|
||||
}
|
||||
|
||||
func (dnll *VolumeLocationList) String() string {
|
||||
return fmt.Sprintf("%v", dnll.list)
|
||||
}
|
||||
|
||||
func (dnll *VolumeLocationList) Head() *DataNode {
|
||||
return dnll.list[0]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user