mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
- Update go.mod to use Go 1.24.1 - Update GitHub Actions setup-go action to use Go 1.24.1 - Fix linting issues with golangci-lint by: - Updating to golangci-lint v1.57.1 (more compatible with Go 1.24.1) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <claude@anthropic.com>
25 lines
400 B
Go
25 lines
400 B
Go
//go:build linux
|
|
|
|
package pty
|
|
|
|
import (
|
|
"github.com/u-root/u-root/pkg/termios"
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
func (p *otherPty) EchoEnabled() (echo bool, err error) {
|
|
err = p.control(p.pty, func(fd uintptr) error {
|
|
t, err := termios.GetTermios(fd)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
echo = (t.Lflag & unix.ECHO) != 0
|
|
return nil
|
|
})
|
|
if err != nil {
|
|
return false, err
|
|
}
|
|
return echo, nil
|
|
}
|