func SdNotify(state string) error {
	name := os.Getenv("NOTIFY_SOCKET")
	if name == "" {
		return ErrSdNotifyNoSocket
	}

	conn, err := net.DialUnix("unixgram", nil, &net.UnixAddr{Name: name, Net: "unixgram"})
	if err != nil {
		return err
	}
	defer conn.Close()

	_, err = conn.Write([]byte(state))
	return err
}
func SdNotify(state string) error {
	name := os.Getenv("NOTIFY_SOCKET")
	if name == "" {
		return ErrSdNotifyNoSocket
	}

	conn, err := net.DialUnix("unixgram", nil, &net.UnixAddr{Name: name, Net: "unixgram"})
	if err != nil {
		return err
	}
	defer conn.Close()

	_, err = conn.Write([]byte(state))
	return err
}
func SdNotify ( state string ) error { name := os . Getenv ( " " ) if name == " " { return ErrSdNotifyNoSocket } conn , err := net . DialUnix ( " " , nil , & net . UnixAddr { Name : name , Net : " " } ) if err != nil { return err } defer conn . Close ( ) _ , err = conn . Write ( [ ] byte ( state ) ) return err }
// SdNotify sends a specified string to the systemd notification socket.
SdNotify sends a specified string to the systemd notification socket .