I'm starting to learn GO and would like for someone to help me understand something. How can I read the value at address that is returned by syscall.GetcomputerName
? I understand that that call will store the address in variable y
. Thank you
package main
import "fmt"
import "syscall"
import "os"
func main() {
x, err := os.Hostname()
y := syscall.GetComputerName
if err != nil {
fmt.Println(err)
}
fmt.Println(x)
fmt.Println(y)
}