mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 22:40:12 +01:00
feat(zfspv) Add golint check to travis (#175)
Signed-off-by: vaniisgh <vanisingh@live.co.uk>
This commit is contained in:
parent
8b7ad5cb45
commit
8bbf3d7d2f
34 changed files with 321 additions and 266 deletions
|
|
@ -27,21 +27,21 @@ type PVC struct {
|
|||
object *corev1.PersistentVolumeClaim
|
||||
}
|
||||
|
||||
// PVCList is a wrapper over persistentvolumeclaim api
|
||||
// List is a wrapper over persistentvolumeclaim api
|
||||
// object. It provides build, validations and other common
|
||||
// logic to be used by various feature specific callers.
|
||||
type PVCList struct {
|
||||
type List struct {
|
||||
items []*PVC
|
||||
}
|
||||
|
||||
// Len returns the number of items present
|
||||
// in the PVCList
|
||||
func (p *PVCList) Len() int {
|
||||
// in the List
|
||||
func (p *List) Len() int {
|
||||
return len(p.items)
|
||||
}
|
||||
|
||||
// ToAPIList converts PVCList to API PVCList
|
||||
func (p *PVCList) ToAPIList() *corev1.PersistentVolumeClaimList {
|
||||
// ToAPIList converts List to API List
|
||||
func (p *List) ToAPIList() *corev1.PersistentVolumeClaimList {
|
||||
plist := &corev1.PersistentVolumeClaimList{}
|
||||
for _, pvc := range p.items {
|
||||
plist.Items = append(plist.Items, *pvc.object)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue