File: session_config.go

package info (click to toggle)
golang-github-viant-toolbox 0.33.2-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,280 kB
  • sloc: makefile: 16
file content (25 lines) | stat: -rw-r--r-- 411 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package ssh

//SessionConfig represents a new session config
type SessionConfig struct {
	EnvVariables map[string]string
	Shell        string
	Term         string
	Rows         int
	Columns      int
}

func (c *SessionConfig) applyDefault() {
	if c.Shell == "" {
		c.Shell = "/bin/bash"
	}
	if c.Term == "" {
		c.Term = "xterm"
	}
	if c.Rows == 0 {
		c.Rows = 100
	}
	if c.Columns == 0 {
		c.Columns = 100
	}
}