Skip to content
Open
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
4 changes: 4 additions & 0 deletions gendoc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,10 @@ func formatUsageDesc(s string) string {
for _, v := range m {
title := strings.TrimSpace(v[1])
descp := strings.TrimSpace(v[2])
if descp == "" {
rr = append(rr, title)
continue
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not recommended to change this, as it will affect the provider's generated document titles.
https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/latest/docs

example:
Clipboard_Screenshot_1766406302


rr = append(rr, fmt.Sprintf("### %s\n\n%s", title, descp))
}
Expand Down
5 changes: 5 additions & 0 deletions tencentcloud/services/teo/resource_tc_teo_l7_acc_setting.go

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

16 changes: 8 additions & 8 deletions tencentcloud/services/teo/resource_tc_teo_origin_group.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
@@ -1 +1,56 @@
package teo

import (
"fmt"
"hash/crc32"
"sort"
"strings"
)

func teoOriginGroupRecordsHash(v interface{}) int {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this function for using a custom hash to perform resource migration verification?

m, ok := v.(map[string]interface{})
if !ok {
return 0
}

record := ""
if rv, ok := m["record"].(string); ok {
record = rv
}

recordType := ""
if tv, ok := m["type"].(string); ok {
recordType = tv
}

weight := 0
if wv, ok := m["weight"].(int); ok {
weight = wv
}

private := false
if pv, ok := m["private"].(bool); ok {
private = pv
}

privateParamsSig := ""
if raw, ok := m["private_parameters"]; ok {
if list, ok := raw.([]interface{}); ok {
pairs := make([]string, 0, len(list))
for _, item := range list {
pm, ok := item.(map[string]interface{})
if !ok {
continue
}
name, _ := pm["name"].(string)
value, _ := pm["value"].(string)
pairs = append(pairs, name+"="+value)
}
sort.Strings(pairs)
privateParamsSig = strings.Join(pairs, ",")
}
}

s := fmt.Sprintf("record=%s|type=%s|weight=%d|private=%t|private_parameters=%s", record, recordType, weight, private, privateParamsSig)
return int(crc32.ChecksumIEEE([]byte(s)))
}
6 changes: 3 additions & 3 deletions tencentcloud/services/thpc/resource_tc_thpc_workspaces.go

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

Loading