cloudinit/vendor/github.com/sigma/vmw-guestinfo/examples/main.go
Vasiliy Tolstov 414957d985 fix build
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2015-11-09 09:08:44 +00:00

23 lines
480 B
Go

package main
import (
"fmt"
"github.com/coreos/coreos-cloudinit/github.com/sigma/vmw-guestinfo/rpcvmx"
"github.com/coreos/coreos-cloudinit/github.com/sigma/vmw-guestinfo/vmcheck"
)
func main() {
if !vmcheck.IsVirtualWorld() {
fmt.Println("not in a virtual world... :(")
return
}
version, typ := vmcheck.GetVersion()
fmt.Println(version, typ)
config := rpcvmx.NewConfig()
fmt.Println(config.GetString("foo", "foo"))
fmt.Println(config.GetString("bar", "foo"))
}