diff --git a/base.go b/base.go index b384634..89e67b9 100644 --- a/base.go +++ b/base.go @@ -48,24 +48,24 @@ type DevicePathNode interface { var ErrPathComplete = errors.New("device path already complete") type DevicePath struct { - nodes []DevicePathNode + Nodes []DevicePathNode } func (dp *DevicePath) complete() bool { - return len(dp.nodes) > 0 && dp.nodes[len(dp.nodes)-1].Type() == EndOfHardwareDevicePath + return len(dp.Nodes) > 0 && dp.Nodes[len(dp.Nodes)-1].Type() == EndOfHardwareDevicePath } func (dp *DevicePath) PushNode(node DevicePathNode) error { if dp.complete() { return ErrPathComplete } - dp.nodes = append(dp.nodes, node) + dp.Nodes = append(dp.Nodes, node) return nil } func (dp *DevicePath) String() string { var res []string - for _, node := range dp.nodes { + for _, node := range dp.Nodes { if node.String() != "" { res = append(res, node.String()) }