summaryrefslogtreecommitdiff
path: root/get_darwin.go
blob: 39cbe0a28d2e80a02bc14588f7162107ad7806a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package hostname

// functions to import and export the protobuf
// data to and from config files

import (
	"os"
)

// scutil --get HostName
// scutil --get LocalHostName
// scutil --get ComputerName
// scutil --set HostName my-mac.example.com

func osGetHostname() (string, error) {
	hostname, err := os.Hostname()
	return hostname, err
}