1 2 3 4 5 6 7 8 9 10 11 12 13
package hostname // functions to import and export the protobuf // data to and from config files import ( "os" ) func osGetHostname() (string, error) { hostname, err := os.Hostname() return hostname, err }