Hostname: Difference between revisions

Content added Content deleted
(add entry for Go)
Line 112: Line 112:
print *, name
print *, name
end program HostTest</lang>
end program HostTest</lang>

=={{header|Go}}==
<lang Go>package main

import (
"fmt"
"os"
)

func main(){
host, _ := os.Hostname()
fmt.Printf("hostname: %s\n", host);
}</lang>


=={{header|Groovy}}==
=={{header|Groovy}}==