diff options
| author | Jeff Carr <[email protected]> | 2025-03-22 02:27:07 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-22 02:27:07 -0500 |
| commit | beb811c51d2d59fa0ec66189ec44dae066004299 (patch) | |
| tree | 8257710b0faea6382a61f66539bf0779f76be44a /get_darwin.go | |
day1v0.0.1
Diffstat (limited to 'get_darwin.go')
| -rw-r--r-- | get_darwin.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/get_darwin.go b/get_darwin.go new file mode 100644 index 0000000..39cbe0a --- /dev/null +++ b/get_darwin.go @@ -0,0 +1,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 +} |
