mirror of https://github.com/containers/podman.git
				
				
				
			
		
			
				
	
	
		
			23 lines
		
	
	
		
			303 B
		
	
	
	
		
			Go
		
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			303 B
		
	
	
	
		
			Go
		
	
	
	
//go:build plan9 || solaris
 | 
						|
// +build plan9 solaris
 | 
						|
 | 
						|
package goterm
 | 
						|
 | 
						|
func getWinsize() (*winsize, error) {
 | 
						|
	ws := new(winsize)
 | 
						|
 | 
						|
	ws.Col = 80
 | 
						|
	ws.Row = 24
 | 
						|
 | 
						|
	return ws, nil
 | 
						|
}
 | 
						|
 | 
						|
// Height gets console height
 | 
						|
func Height() int {
 | 
						|
	ws, err := getWinsize()
 | 
						|
	if err != nil {
 | 
						|
		return -1
 | 
						|
	}
 | 
						|
	return int(ws.Row)
 | 
						|
}
 |