Skip to content

Commit 33687ee

Browse files
committed
Change tag name check to accomodate more cases in LogUnsupportedServiceConfigFields
1 parent 02e3487 commit 33687ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ecs-cli/modules/cli/compose/logger/logger.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ func LogUnsupportedServiceConfigFields(serviceName string, serviceConfig *config
7878
fieldType := configType.Field(i)
7979
// get the tag name (if any), defaults to fieldName
8080
tagName := fieldType.Name
81-
yamlTag := fieldType.Tag.Get("yaml") // Expected format `yaml:"tagName,omitempty"` // TODO, handle omitempty
81+
yamlTag := fieldType.Tag.Get("yaml") // Expected format `yaml:"tagName,omitempty"`
8282
if yamlTag != "" {
8383
tags := strings.Split(yamlTag, ",")
84-
if len(tags) > 0 {
84+
if tags[0] != "" {
8585
tagName = tags[0]
8686
}
8787
}

0 commit comments

Comments
 (0)