github.com/viant/toolbox@v0.34.5/ssh/session_config.go (about)

     1  package ssh
     2  
     3  //SessionConfig represents a new session config
     4  type SessionConfig struct {
     5  	EnvVariables map[string]string
     6  	Shell        string
     7  	Term         string
     8  	Rows         int
     9  	Columns      int
    10  }
    11  
    12  func (c *SessionConfig) applyDefault() {
    13  	if c.Shell == "" {
    14  		c.Shell = "/bin/bash"
    15  	}
    16  	if c.Term == "" {
    17  		c.Term = "xterm"
    18  	}
    19  	if c.Rows == 0 {
    20  		c.Rows = 100
    21  	}
    22  	if c.Columns == 0 {
    23  		c.Columns = 100
    24  	}
    25  }