so the Go tooling complains if it has a non-standard signature.
Additional info
Mostly logging this here in case other people run into this problem. It causes all sorts of weird inscrutable errors downstream, e.g., if you try to use define an interface for TTY
type TerminalInput interface {
ReadRune() (rune, error)
}
var _ TerminalInput = &tty.TTY{}
There's some discussion upstream about adding ways to suppress the error.
Repro steps
If I try to run
go vet
on this library, I get:Root cause
ReadRune is now defined as a "standard method" in the go stdlib.
https://cs.opensource.google/go/x/tools/+/refs/tags/v0.24.0:go/analysis/passes/stdmethods/stdmethods.go;l=57
so the Go tooling complains if it has a non-standard signature.
Additional info
Mostly logging this here in case other people run into this problem. It causes all sorts of weird inscrutable errors downstream, e.g., if you try to use define an interface for TTY
There's some discussion upstream about adding ways to suppress the error.
https://github.com/golang/go/issues/52445