File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ package tmuxp
2
+
3
+ import "io"
4
+
5
+ // Window represents a window in a tmux session
6
+ type Window struct {
7
+ Name string
8
+ Panes []struct {}
9
+ }
10
+
11
+ // Windows represents a list of windows in a tmux session
12
+ type Windows []Window
13
+
14
+ // Environment represents env variables to be loaded in a tmux session
15
+ type Environment map [string ]string
16
+
17
+ // Config represents tmuxp config
18
+ type Config struct {
19
+ SessionName string
20
+ Windows
21
+ Environment
22
+ writer io.Writer
23
+ }
24
+
25
+ // New returns a new tmuxp config
26
+ func New (writer io.Writer ) Config {
27
+ return Config {
28
+ writer : writer ,
29
+ }
30
+ }
Original file line number Diff line number Diff line change
1
+ package tmuxp_test
2
+
3
+ import (
4
+ "io"
5
+ "testing"
6
+
7
+ "github.com/arunvelsriram/kube-tmuxp/pkg/tmuxp"
8
+ "github.com/stretchr/testify/assert"
9
+ )
10
+
11
+ func TestNew (t * testing.T ) {
12
+ var writer io.Writer
13
+ tmuxpCfg := tmuxp .New (writer )
14
+
15
+ assert .NotNil (t , tmuxpCfg )
16
+ }
You can’t perform that action at this time.
0 commit comments