feat(zfspv) Add golint check to travis (#175)

Signed-off-by: vaniisgh <vanisingh@live.co.uk>
This commit is contained in:
vaniisgh 2020-07-07 18:21:02 +05:30 committed by GitHub
parent 8b7ad5cb45
commit 8bbf3d7d2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 321 additions and 266 deletions

View file

@ -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)