Skip to content

Commit 1146199

Browse files
committed
fix lint error
1 parent cc96890 commit 1146199

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ vet:
5656

5757
# Linter
5858
lint: gofmt
59-
golangci-lint run -c ./.golangci.yml ./internal/... .
59+
golangci-lint run -c ./.golangci.yml ./internal/... --timeout 5m
6060

6161
acc-test:
6262
go test $(TEST_PKGS) -tags $(BUILD_TAGS)

internal/helper/helper.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ func GetAllMapsKeys(maps ...map[string]interface{}) map[string]bool {
228228
return keys
229229
}
230230

231+
// nolint:godot
231232
// DatasourceSchemaFromResourceSchema is a recursive func that
232233
// converts an existing Resource schema to a Datasource schema.
233234
// All schema elements are copied, but certain attributes are ignored or changed:
@@ -236,6 +237,7 @@ func GetAllMapsKeys(maps ...map[string]interface{}) map[string]bool {
236237
// - Validation funcs and attributes (e.g. MaxItems) are not copied
237238
func DatasourceSchemaFromResourceSchema(rs map[string]*schema.Schema) map[string]*schema.Schema {
238239
ds := make(map[string]*schema.Schema, len(rs))
240+
239241
for k, v := range rs {
240242
dv := &schema.Schema{
241243
Computed: true,
@@ -266,11 +268,11 @@ func DatasourceSchemaFromResourceSchema(rs map[string]*schema.Schema) map[string
266268
default:
267269
// Elem of all other types are copied as-is
268270
dv.Elem = v.Elem
269-
270271
}
271-
ds[k] = dv
272272

273+
ds[k] = dv
273274
}
275+
274276
return ds
275277
}
276278

internal/resources/tanzukubernetescluster/data_source.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
)
1919

2020
func DataSourceTanzuKubernetesCluster() *schema.Resource {
21-
2221
dsSchema := helper.DatasourceSchemaFromResourceSchema(tanzuKubernetesClusterSchema)
2322

2423
// Set 'Required' schema elements

0 commit comments

Comments
 (0)