From b8484ff99dde3c9c707427834e2332eed79371b4 Mon Sep 17 00:00:00 2001 From: Kimmo Lehto Date: Tue, 20 Apr 2021 14:39:00 +0300 Subject: [PATCH] Omit empty bastion from yaml --- ssh.go | 2 +- winrm.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ssh.go b/ssh.go index 6666a32e..ae50720d 100644 --- a/ssh.go +++ b/ssh.go @@ -36,7 +36,7 @@ type SSH struct { Port int `yaml:"port" default:"22" validate:"gt=0,lte=65535"` KeyPath string `yaml:"keyPath" validate:"omitempty"` HostKey string `yaml:"hostKey,omitempty"` - Bastion *SSH + Bastion *SSH `yaml:"bastion,omitempty"` name string diff --git a/winrm.go b/winrm.go index 10c24ec0..8f79fe10 100644 --- a/winrm.go +++ b/winrm.go @@ -36,7 +36,7 @@ type WinRM struct { CertPath string `yaml:"certPath,omitempty" validate:"omitempty,file"` KeyPath string `yaml:"keyPath,omitempty" validate:"omitempty,file"` TLSServerName string `yaml:"tlsServerName,omitempty" validate:"omitempty,hostname|ip"` - Bastion *SSH `yaml:"bastion"` + Bastion *SSH `yaml:"bastion,omitempty"` name string