2015-05-15 03:42:11 +03:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
2015-11-09 12:08:44 +03:00
|
|
|
"github.com/coreos/coreos-cloudinit/github.com/sigma/vmw-guestinfo/rpcvmx"
|
|
|
|
"github.com/coreos/coreos-cloudinit/github.com/sigma/vmw-guestinfo/vmcheck"
|
2015-05-15 03:42:11 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
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"))
|
|
|
|
}
|