mirror of
https://github.com/make-42/hayai.git
synced 2025-01-19 02:47:35 +01:00
28 lines
496 B
Go
28 lines
496 B
Go
|
// Package beeep provides a cross-platform library for sending desktop notifications and beeps.
|
||
|
package beeep
|
||
|
|
||
|
import (
|
||
|
"errors"
|
||
|
"path/filepath"
|
||
|
"runtime"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
// ErrUnsupported is returned when operating system is not supported.
|
||
|
ErrUnsupported = errors.New("beeep: unsupported operating system: " + runtime.GOOS)
|
||
|
)
|
||
|
|
||
|
func pathAbs(path string) string {
|
||
|
var err error
|
||
|
var abs string
|
||
|
|
||
|
if path != "" {
|
||
|
abs, err = filepath.Abs(path)
|
||
|
if err != nil {
|
||
|
abs = path
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return abs
|
||
|
}
|