Skip to content

Commit 7c93c13

Browse files
AV-152703 Fixed lint issues (#449)
* AV-152703 Fixed lint issues Signed-off-by: Yograj Shisode <[email protected]>
1 parent 89b778d commit 7c93c13

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

.github/workflows/golangci-lint.yml

-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ jobs:
1212
with:
1313
version: v1.48.0
1414
args: --issues-exit-code=1
15-
only-new-issues: true
1615
skip-pkg-cache: true
1716
skip-build-cache: true

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fetch-depth: 0
1616
-
1717
name: Set up Go
18-
uses: actions/setup-go@v2
18+
uses: actions/setup-go@v3
1919
with:
2020
go-version: 1.16
2121
-

avi/provider_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
package avi
1313

1414
import (
15-
"fmt"
1615
"os"
1716
"strconv"
1817
"testing"
@@ -138,6 +137,6 @@ func testAccPreCheck(t *testing.T) {
138137
session.SetInsecure, session.SetTimeout(config.Timeout))
139138

140139
if err != nil {
141-
t.Fatal(fmt.Sprintf("%+v", err))
140+
t.Fatalf("%+v", err)
142141
}
143142
}

avi/resource_avi_cloud.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ func isCloudReady(cloudState string) bool {
273273
return false
274274
}
275275

276-
//wait until vcenter inventory gets completed to configure mgmt IP
277276
func waitForVcenterState(cloudUUID string, client *clients.AviClient, maxRetry int) error {
277+
// wait until vcenter inventory gets completed to configure mgmt IP
278278
var robj interface{}
279279
var err error
280280
var inventoryState string
@@ -332,8 +332,8 @@ func waitForCloudReady(cloudUUID string, client *clients.AviClient, maxRetry int
332332
return err
333333
}
334334

335-
//Setup management network for vcenter cloud
336335
func setupVcenterMgmtNetwork(d *schema.ResourceData, meta interface{}) error {
336+
// Setup management network for vcenter cloud
337337
s := ResourceCloudSchema()
338338
var maxRetry int
339339
if retryCount, isRetry := os.LookupEnv("cloud_state_max_retry"); !isRetry {

avi/utils.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -537,8 +537,8 @@ func APIDeleteSystemDefaultCheck(d *schema.ResourceData) bool {
537537
return false
538538
}
539539

540-
//Open given file as a file pointer
541540
func mustOpen(f string) *os.File {
541+
// Open given file as a file pointer
542542
r, err := os.Open(f)
543543
if err != nil {
544544
log.Printf("[ERROR] mustOpen Error while opening file %v", f)
@@ -566,8 +566,8 @@ func createFilePointer(path string) (*os.File, error) {
566566
}
567567
}
568568

569-
//Function to make REST API call for upload and download.
570569
func MultipartUploadOrDownload(d *schema.ResourceData, meta interface{}, s map[string]*schema.Schema) error {
570+
// Function to make REST API call for upload and download.
571571
client := meta.(*clients.AviClient)
572572
uri := d.Get("uri").(string)
573573
localFile := d.Get("local_file").(string)

0 commit comments

Comments
 (0)