mirror of
				https://github.com/containers/podman.git
				synced 2025-11-01 02:42:11 +08:00 
			
		
		
		
	 56d6ee0808
			
		
	
	56d6ee0808
	
	
	
		
			
			golang.org/x/crypto/ssh/terminal is deprecated. The package was moved to golang.org/x/term. golang.org/x/crypto/ssh/terminal was already just calling golang.org/x/term itslef so there are no functional changes. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
		
			
				
	
	
		
			26 lines
		
	
	
		
			540 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			540 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| //go:build !windows
 | |
| // +build !windows
 | |
| 
 | |
| package containers
 | |
| 
 | |
| import (
 | |
| 	"context"
 | |
| 	"os"
 | |
| 	"os/signal"
 | |
| 
 | |
| 	sig "github.com/containers/podman/v4/pkg/signal"
 | |
| 	"golang.org/x/term"
 | |
| )
 | |
| 
 | |
| func makeRawTerm(stdin *os.File) (*term.State, error) {
 | |
| 	return term.MakeRaw(int(stdin.Fd()))
 | |
| }
 | |
| 
 | |
| func notifyWinChange(ctx context.Context, winChange chan os.Signal, stdin *os.File, stdout *os.File) {
 | |
| 	signal.Notify(winChange, sig.SIGWINCH)
 | |
| }
 | |
| 
 | |
| func getTermSize(stdin *os.File, stdout *os.File) (width, height int, err error) {
 | |
| 	return term.GetSize(int(stdin.Fd()))
 | |
| }
 |