File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
resources/tanzukubernetescluster Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 5656
5757# Linter
5858lint : gofmt
59- golangci-lint run -c ./.golangci.yml ./internal/... .
59+ golangci-lint run -c ./.golangci.yml ./internal/... --timeout 5m
6060
6161acc-test :
6262 go test $(TEST_PKGS ) -tags $(BUILD_TAGS )
Original file line number Diff line number Diff 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
237238func 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
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import (
1818)
1919
2020func DataSourceTanzuKubernetesCluster () * schema.Resource {
21-
2221 dsSchema := helper .DatasourceSchemaFromResourceSchema (tanzuKubernetesClusterSchema )
2322
2423 // Set 'Required' schema elements
You can’t perform that action at this time.
0 commit comments