1
0
mirror of synced 2026-02-13 13:06:56 +00:00

misc: address strings.Title deprecation

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This commit is contained in:
Hidde Beydals
2023-10-13 10:01:35 +02:00
parent ac95ac0653
commit 16d352b15b
12 changed files with 40 additions and 25 deletions

View File

@@ -19,10 +19,11 @@ package main
import (
"fmt"
"strconv"
"strings"
"time"
"github.com/spf13/cobra"
"golang.org/x/text/cases"
"golang.org/x/text/language"
"k8s.io/apimachinery/pkg/runtime"
imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2"
@@ -82,7 +83,7 @@ func (s imageRepositoryListAdapter) summariseItem(i int, includeNamespace bool,
lastScan = item.Status.LastScanResult.ScanTime.Time.Format(time.RFC3339)
}
return append(nameColumns(&item, includeNamespace, includeKind),
lastScan, strings.Title(strconv.FormatBool(item.Spec.Suspend)), status, msg)
lastScan, cases.Title(language.English).String(strconv.FormatBool(item.Spec.Suspend)), status, msg)
}
func (s imageRepositoryListAdapter) headers(includeNamespace bool) []string {