try not to panic
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-10-26 15:28:21 +11:00
parent 85a054fcc7
commit 9741c91af2

31
main.go
View File

@@ -184,24 +184,7 @@ func getScsiBusSharingVMs(client *govmomi.Client) error {
func generateBusSharingTable() string {
// Define the HTML template
htmlTemplate := `
<table><tbody>
<tr>
<th>Vm Name</th>
<th>Cluster Name</th>
<th>Controller Name</th>
<th>Sharing Type</th>
</tr>
{{range .}}
<tr>
<td>{{.VmName}}</td>
<td>{{.ClusterName}}</td>
<td>{{.ControllerName}}</td>
<td>{{.SharingType}}</td>
</tr>
{{end}}
</tbody></table>
`
htmlTemplate := `<table><tbody><tr><th>Vm Name</th><th>Cluster Name</th><th>Controller Name</th><th>Sharing Type</th></tr>{{range .}}<tr><td>{{.VmName}}</td><td>{{.ClusterName}}</td><td>{{.ControllerName}}</td><td>{{.SharingType}}</td></tr>{{end}}</tbody></table>`
// Create a new template and parse the HTML template
tmpl := template.Must(template.New("table").Parse(htmlTemplate))
@@ -368,20 +351,20 @@ func main() {
fmt.Printf("New Content: %v\n", newContent)
data := &goconfluence.Content{
ID: c.ID,
Type: c.Type,
Title: c.Title,
ID: *cPageId,
Type: "page",
Title: "VMs with SCSI Bus Sharing",
Body: goconfluence.Body{
Storage: goconfluence.Storage{
Value: newContent,
Representation: c.Body.Storage.Representation,
Representation: "storage",
},
},
Version: &goconfluence.Version{
Number: 3,
Number: 6,
},
Space: &goconfluence.Space{
Key: c.Space.Key,
Key: *cSpaceKey,
},
}
//c.Body.Storage.Value = newContent