如何使用Golang连接ESX服务器

I am new to the GoLang. I need to connect to the ESX server. I am using govmomi library but I am not sure how to create connection and access the VMs. e.g Getting power state info of particular VM.

Can someone help me to connect to ESX and access the VMs if possible please share the code?

I have gone through the github link : govmomi library

But I am not able to understand as there is no example available.

Below is the snippet of my code.

func main()  {
    // Creating a connection context
    ctx, cancel := context.WithCancel(context.Background())
    defer cancel()

    // Parsing URL
    url, err := url.Parse("https://<username>:<password>@<IP>/sdk")
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error: %s
", err)
        os.Exit(1)
    }

    // Connecting to vCenter
    _, err = govmomi.NewClient(ctx, url, true)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error: %s
", err)
        os.Exit(1)
    }
}

Is there any other libraries present for the same? Thanks in advance.