Hostname behavior across operating systems is inconsistent (Macs can have uppercase host names, so can some other systems). In general, always strings.ToLower(os.Hostname()).