22
vendor/github.com/sigma/vmw-guestinfo/examples/main.go
generated
vendored
Normal file
22
vendor/github.com/sigma/vmw-guestinfo/examples/main.go
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
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"))
|
||||
}
|
Reference in New Issue
Block a user