pty.go
This file
Path
spin/pty.go
22 lines · 374 bytes · Go
Last changed by
fix: lint issues (#909)Carlos Alexandro Beckerbefore adoption817c4bd
History of this fileTake it
1package spin23import (4 "os"56 "github.com/charmbracelet/x/term"7 "github.com/charmbracelet/x/xpty"8)910func openPty(f *os.File) (pty xpty.Pty, err error) {11 width, height, err := term.GetSize(f.Fd())12 if err != nil {13 return nil, err //nolint:wrapcheck14 }1516 pty, err = xpty.NewPty(width, height)17 if err != nil {18 return nil, err //nolint:wrapcheck19 }2021 return pty, nil22}