Skip to content

refactor(tke): [116916935] regenerate some tke datasource #2584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions tencentcloud/internal/helper/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,28 @@ func InterfacesIntInt64Point(configured []interface{}) []*int64 {
return vs
}

func Int64Slice2Int64PointerSlice(in []int64) []*int64 {
if in == nil {
return nil
}
ret := make([]*int64, len(in))
for i, v := range in {
ret[i] = Int64(v)
}
return ret
}

func UInt64Slice2UInt64PointerSlice(in []uint64) []*uint64 {
if in == nil {
return nil
}
ret := make([]*uint64, len(in))
for i, v := range in {
ret[i] = Uint64(v)
}
return ret
}

func InterfacesUint64Point(configured []interface{}) []*uint64 {
vs := make([]*uint64, 0, len(configured))
for _, v := range configured {
Expand All @@ -169,6 +191,28 @@ func InterfacesIntUInt64Point(configured []interface{}) []*uint64 {
return vs
}

func Float64Slice2Float64PointerSlice(in []float64) []*float64 {
if in == nil {
return nil
}
ret := make([]*float64, len(in))
for i, v := range in {
ret[i] = Float64(v)
}
return ret
}

func BoolSlice2BoolPointerSlice(in []bool) []*bool {
if in == nil {
return nil
}
ret := make([]*bool, len(in))
for i, v := range in {
ret[i] = Bool(v)
}
return ret
}

// StringsInterfaces Flatten to an array of raw strings and returns a []interface{}
func StringsInterfaces(list []*string) []interface{} {
vs := make([]interface{}, 0, len(list))
Expand Down
116 changes: 69 additions & 47 deletions tencentcloud/services/tke/data_source_tc_kubernetes_charts.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package tke
Loading
Loading