go version)?$ go version go version go1.12.1 darwin/amd64
yes
go env)?go env Output
$ go env
not important
import (
"os"
"golang.org/x/crypto/ssh/terminal"
)
// abridged version
func checkIsTerminal(fd *osFile) bool {
if fd != nil {
return terminal.IsTerminal(int(fd.Fd()))
}
return false
}
no "crypto" or "ssh" wording in import directive - there is nothing is going on what is cryptography-related
Since it has "crypto" part in a path, we have to explain to our legal department what do we do here, why do we need it, and how it affects whole solution software export restrictions.
It would be nice to have non-crypto and non-password related parts to be moved into library that has nothing to do with "crypto" or "ssh", as it definitely has more utility than just for ssh-related work.
We've created golang.org/x/term exactly for this purpose. But the move hasn't been done yet.
This is related to issue #13104.
/cc @matloob @bradfitz
I think we should move all exposed APIs over from x/crypto/ssh/terminal to x/term (using type aliases as needed) and mark x/crypto/ssh/terminal frozen and deprecated. It indeed makes no sense in x/crypto and that's what x/term is for.
It would be nice if we had a maintainer for any of this code.
Overall I guess it is OK if we just move that code wholesale into x/term.
I'm not really sure about the API, but it would at least clean things up
not to have it in crypto.
This seems OK. We can't delete the old code but we can deprecate it.
I've seen no objections, so this seems like a likely accept.
@rsc -- what does "maintainer" role implies, sorry?
A maintainer is someone with experience with the code who is willing to take responsibility for reviewing contributions and fixing issues related to the code.
No change in consensus, so accepted.
Change https://golang.org/cl/258003 mentions this issue: ssh/terminal: replace with a golang.org/x/term wrapper
Most helpful comment
A maintainer is someone with experience with the code who is willing to take responsibility for reviewing contributions and fixing issues related to the code.