Source File
pty.go
Belonging Package
internal/testpty
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package testpty is a simple pseudo-terminal package for Unix systems,
// implemented by calling C functions via cgo.
package testpty
import (
)
type PtyError struct {
FuncName string
ErrorString string
Errno error
}
func ptyError( string, error) *PtyError {
return &PtyError{, .Error(), }
}
func ( *PtyError) () string {
return fmt.Sprintf("%s: %s", .FuncName, .ErrorString)
}
func ( *PtyError) () error { return .Errno }
var ErrNotSupported = errors.New("testpty.Open not implemented on this platform")
// Open returns a control pty and the name of the linked process tty.
//
// If Open is not implemented on this platform, it returns ErrNotSupported.
func () ( *os.File, string, error) {
return open()
}
The pages are generated with Golds v0.7.0-preview. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |