diff --git a/internal/docker/helpers.go b/internal/docker/helpers.go index 360a82b..ea8104f 100644 --- a/internal/docker/helpers.go +++ b/internal/docker/helpers.go @@ -40,9 +40,5 @@ func randomID(length int) (string, error) { // cutLast splits s around the last occurrence of sep, like strings.Cut but // from the right. func cutLast(s, sep string) (before, after string, found bool) { - i := strings.LastIndex(s, sep) - if i < 0 { - return s, "", false - } - return s[:i], s[i+len(sep):], true + return strings.CutLast(s, sep) }