Feat/revive (#212)

* enable revive as linter
* fix var-naming revive issues
* fix blank-imports revive issues
* fix receiver-naming revive issues
* fix exported revive issues
* fix indent-error-flow revive issues
* fix unexported-return revive issues
* fix indent-error-flow revive issues
Signed-off-by: Fabian Kammel <fk@edgeless.systems>
This commit is contained in:
Fabian Kammel 2022-10-05 15:02:46 +02:00 committed by GitHub
parent 2e93b354e4
commit 369480a50b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 206 additions and 204 deletions

View file

@ -32,9 +32,8 @@ func (c *Client) GetNodeImage(ctx context.Context, providerID string) (string, e
}
if resp.Properties.StorageProfile.ImageReference.ID != nil {
return *resp.Properties.StorageProfile.ImageReference.ID, nil
} else {
return *resp.Properties.StorageProfile.ImageReference.CommunityGalleryImageID, nil
}
return *resp.Properties.StorageProfile.ImageReference.CommunityGalleryImageID, nil
}
// GetScalingGroupID returns the scaling group ID of the node.

View file

@ -222,7 +222,7 @@ func TestCreateNode(t *testing.T) {
list: tc.preexistingVMs,
fetchErr: tc.fetchErr,
}
poller := NewStubCapacityPoller(tc.pollErr)
poller := newStubCapacityPoller(tc.pollErr)
client := Client{
virtualMachineScaleSetVMsAPI: &stubvirtualMachineScaleSetVMsAPI{
pager: pager,
@ -357,7 +357,7 @@ type stubCapacityPoller struct {
doneC chan struct{}
}
func NewStubCapacityPoller(pollErr error) *stubCapacityPoller {
func newStubCapacityPoller(pollErr error) *stubCapacityPoller {
return &stubCapacityPoller{
pollErr: pollErr,
pollC: make(chan struct{}),

View file

@ -34,9 +34,8 @@ func (c *Client) GetScalingGroupImage(ctx context.Context, scalingGroupID string
}
if res.Properties.VirtualMachineProfile.StorageProfile.ImageReference.ID != nil {
return *res.Properties.VirtualMachineProfile.StorageProfile.ImageReference.ID, nil
} else {
return *res.Properties.VirtualMachineProfile.StorageProfile.ImageReference.CommunityGalleryImageID, nil
}
return *res.Properties.VirtualMachineProfile.StorageProfile.ImageReference.CommunityGalleryImageID, nil
}
// SetScalingGroupImage sets the image URI of the scaling group.