-
Icarus Sparry authored
Hostname reads the file /proc/sys/kernel/hostname to determine the value it returns. Some people set this to a Fully Qualified Doamin Name. At least one implementation of /bin/hostname truncates the name it gets (often from the "uname" system call) at the first dot unless it is given a "-f" flag. This change makes the unit test also truncate at the first dot and checks if the strings then match. This seems more portable than adding an extra flag to the called /bin/hostname program. R=rsc CC=golang-dev https://golang.org/cl/181097
090e71e7