diff --git a/doc.go b/doc.go index 491c060..190cfbe 100644 --- a/doc.go +++ b/doc.go @@ -2,9 +2,14 @@ package pty import ( + "errors" "os" ) +// ErrUnsupported is returned if a function is not +// available on the current platform. +var ErrUnsupported = errors.New("unsupported") + // Opens a pty and its corresponding tty. func Open() (pty, tty *os.File, err error) { return open() diff --git a/pty_unsupported.go b/pty_unsupported.go index bdb9e73..d4958b3 100644 --- a/pty_unsupported.go +++ b/pty_unsupported.go @@ -3,14 +3,9 @@ package pty import ( - "errors" "os" ) -var ( - ErrUnsupported = errors.New("Unsupported") -) - func open() (pty, tty *os.File, err error) { return nil, nil, ErrUnsupported }