We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a304307 commit 3cff2edCopy full SHA for 3cff2ed
1 file changed
sync/yaml_commandbuilder_connection.go
@@ -8,16 +8,21 @@ type YamlCommandBuilderConnection struct {
8
Type string
9
Ssh YamlCommandBuilderArgument
10
Docker YamlCommandBuilderArgument
11
+
12
+ connection *commandbuilder.Connection
13
}
14
15
func (yconn *YamlCommandBuilderConnection) GetInstance() *commandbuilder.Connection {
- conn := commandbuilder.Connection{}
- conn.Type = yconn.Type
16
+ if yconn.connection == nil {
17
+ conn := commandbuilder.Connection{}
18
+ conn.Type = yconn.Type
19
+ conn.Ssh = yconn.Ssh.Argument
20
+ conn.Docker = yconn.Docker.Argument
21
- conn.Ssh = yconn.Ssh.Argument
- conn.Docker = yconn.Docker.Argument
22
+ yconn.connection = &conn
23
+ }
24
- return &conn
25
+ return yconn.connection
26
27
28
func (yconn *YamlCommandBuilderConnection) IsEmpty() bool {
0 commit comments