Skip to content

Commit f059a1a

Browse files
committed
Address review comments
Signed-off-by: Oluwole Fadeyi <[email protected]>
1 parent 44bd4f4 commit f059a1a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/agent/config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (c *Config) Dump() (string, error) {
127127
return string(d), nil
128128
}
129129

130-
func (c *Config) validate(isVenafi bool) error {
130+
func (c *Config) validate(isVenafiCloudMode bool) error {
131131
var result *multierror.Error
132132

133133
// configured for Venafi Cloud
@@ -139,7 +139,7 @@ func (c *Config) validate(isVenafi bool) error {
139139
if _, err := url.Parse(c.VenafiCloud.UploadPath); err != nil {
140140
result = multierror.Append(result, fmt.Errorf("upload_path is not a valid URL"))
141141
}
142-
} else if !isVenafi {
142+
} else if !isVenafiCloudMode {
143143
if c.OrganizationID == "" {
144144
result = multierror.Append(result, fmt.Errorf("organization_id is required"))
145145
}
@@ -167,7 +167,7 @@ func (c *Config) validate(isVenafi bool) error {
167167
}
168168

169169
// ParseConfig reads config into a struct used to configure running agents
170-
func ParseConfig(data []byte, isVenafi bool) (Config, error) {
170+
func ParseConfig(data []byte, isVenafiCloudMode bool) (Config, error) {
171171
var config Config
172172

173173
err := yaml.Unmarshal(data, &config)
@@ -186,7 +186,7 @@ func ParseConfig(data []byte, isVenafi bool) (Config, error) {
186186
config.Endpoint.Protocol = "http"
187187
}
188188

189-
err = config.validate(isVenafi)
189+
err = config.validate(isVenafiCloudMode)
190190
if err != nil {
191191
return config, err
192192
}

0 commit comments

Comments
 (0)