From 579b08162acdb121db6849040e9d63862f45e62a Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Thu, 26 Oct 2023 14:39:51 +1100 Subject: [PATCH] bugfix --- main.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 92064c6..033e523 100644 --- a/main.go +++ b/main.go @@ -139,7 +139,7 @@ func getScsiBusSharingVMs(client *govmomi.Client) error { // Determine cluster based on runtime host of VM based on https://github.com/vmware/govmomi/issues/1242#issuecomment-427671990 for _, host := range hsList { if host.Reference() == *vm.Summary.Runtime.Host { - fmt.Printf("host %s matches with parent %s\n", host.Name, host.Parent) + //fmt.Printf("host %s matches with parent %s\n", host.Name, host.Parent) var cluster mo.ManagedEntity err = pc.RetrieveOne(ctx, *host.Parent, []string{"name"}, &cluster) @@ -215,6 +215,7 @@ func generateBusSharingTable() string { // Convert the buffer to a string htmlString := buf.String() + fmt.Printf("generateBusSharingTable : %s\n", htmlString) return htmlString @@ -249,8 +250,9 @@ func updateHtml(htmlContent string, heading string, newTable string) string { } // goquery produces implicit nodes when parsing the input html, remove them now - h = strings.Replace("", h, "", 1) - h = strings.Replace("", h, "", 1) + fmt.Printf("updateHtml whole doc : %s\n", h) + h = strings.Replace(h, "", "", 1) + h = strings.Replace(h, "", "", 1) return h } @@ -281,10 +283,10 @@ func main() { defer f.Close() log.SetOutput(f) - log.Printf("Starting execution. Built on %s from sha1 %s\n", buildTime, sha1ver) + fmt.Printf("Starting execution. Built on %s from sha1 %s\n", buildTime, sha1ver) // So we can convert vCenter UTC to our local timezone - log.Printf("Setting timezone to '%s'\n", *vTZ) + fmt.Printf("Setting timezone to '%s'\n", *vTZ) location, err = time.LoadLocation(*vTZ) if err != nil { fmt.Fprintf(os.Stderr, "Error setting timezone to %s : %s\n", *vTZ, err)