lint: modernize fix

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2025-05-13 20:44:57 +02:00
parent 09b824b9dc
commit 1383aa30c1
27 changed files with 14 additions and 49 deletions
-1
View File
@@ -49,7 +49,6 @@ func TestIsSubPath(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
ok, err := isSubPath(tt.basePath, tt.subPath)
require.NoError(t, err)
-1
View File
@@ -17,7 +17,6 @@ func fromReader(l progress.SubLogger, rc io.ReadCloser) error {
defer func() {
for _, st := range started {
st := st
if st.Completed == nil {
now := time.Now()
st.Completed = &now
-1
View File
@@ -35,7 +35,6 @@ func TestStripCredentials(t *testing.T) {
},
}
for _, tt := range cases {
tt := tt
t.Run(tt.name, func(t *testing.T) {
if g, w := stripCredentials(tt.url), tt.want; g != w {
t.Fatalf("got: %q\nwant: %q", g, w)
-1
View File
@@ -200,7 +200,6 @@ func TestGitRemoteURL(t *testing.T) {
},
}
for _, tt := range cases {
tt := tt
t.Run(tt.name, func(t *testing.T) {
gittestutil.Mktmp(t)
c, err := gitutil.New()
-1
View File
@@ -225,7 +225,6 @@ func (l *loader) fetch(ctx context.Context, fetcher remotes.Fetcher, desc ocispe
eg, ctx := errgroup.WithContext(ctx)
for _, d := range idx.Manifests {
d := d
eg.Go(func() error {
return l.fetch(ctx, fetcher, d, r)
})
-1
View File
@@ -145,7 +145,6 @@ func TestAsAttributeKeyValue(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
kv := keyValue{
Key: "key",