Created
April 2, 2018 10:57
-
-
Save portablejim/fd843d530d699ef1d82d815f13dbbed5 to your computer and use it in GitHub Desktop.
This does not compile.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"golang.org/x/sys/windows/registry" | |
) | |
func main() { | |
winversion, err := registry.OpenKey(registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows NT\CurrentVersion`, registry.QUERY_VALUE) | |
if err == nil { | |
fmt.Printf("Hello world! %v\n", winversion) | |
} else { | |
fmt.Printf("Hello, error.\n") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment