I was following this document to create a key/string in windows registry with this code snippet:
package main
import (
"golang.org/x/sys/windows/registry"
"log"
)
func main() {
k, err := registry.OpenKey(registry.CURRENT_USER, `Software\Microsoft\Windows\CurrentVersion\Audio`, registry.QUERY_VALUE)
if err != nil {
log.Fatal(err)
}
k.SetStringValue("xyz", "blahblah")
err = k.Close()
if err != nil {
log.Fatal(err)
}
}
but nothing happens, without any errors. Edit (clarification): It doesn't work, in any circumstances.