Skip to content

Commit 06f412c

Browse files
committed
Remove unnecessary logic from getAnsibleExecutionNamePrefix
Signed-off-by: Brendan Shephard <[email protected]>
1 parent 0239bc9 commit 06f412c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

pkg/dataplane/util/ansible_execution.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,13 @@ func GetAnsibleExecution(ctx context.Context,
167167

168168
// getAnsibleExecutionNamePrefix compute the name of the AnsibleEE
169169
func getAnsibleExecutionNamePrefix(serviceName string) string {
170-
var executionNamePrefix string
171170
AnsibleExecutionServiceNameLen := apimachineryvalidation.DNS1123LabelMaxLength - 10
171+
172172
if len(serviceName) > AnsibleExecutionServiceNameLen {
173-
executionNamePrefix = serviceName[:AnsibleExecutionServiceNameLen]
174-
} else {
175-
executionNamePrefix = serviceName
173+
return serviceName[:AnsibleExecutionServiceNameLen]
176174
}
177-
return executionNamePrefix
175+
176+
return serviceName
178177
}
179178

180179
// GetAnsibleExecutionNameAndLabels Name and Labels of AnsibleEE

0 commit comments

Comments
 (0)