Skip to content

Commit f8c42fe

Browse files
chore: simplify how result lines are constructed
Co-authored-by: Gabriele Fedi <gabriele.fedi@enterprisedb.com> Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
1 parent 6216a2a commit f8c42fe

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

dagger/maintenance/updatelibs.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,8 @@ func updateOSLibsOnTarget(
4343

4444
var result string
4545
for _, m := range matches {
46-
if len(m) >= 2 {
47-
line := m[1]
48-
if len(m) >= 3 && m[2] != "" {
49-
line += " " + m[2]
50-
}
51-
result += line + "\n"
46+
line := strings.Join(m[1:], " ")
47+
result += strings.TrimSuffix(line, " ") + "\n"
5248
}
5349
}
5450

0 commit comments

Comments
 (0)