chore: satisfy Go 1.26 lint checks
This commit is contained in:
parent
733714a5e7
commit
b52eefaa40
@ -226,14 +226,6 @@ func (r *runtime) withLocalStoreLocked(autoShareUpdate bool, fn func() error) er
|
||||
return r.withLocalStoreUpdateLocked(boolShareUpdateMode(autoShareUpdate), true, fn)
|
||||
}
|
||||
|
||||
func (r *runtime) withLocalStoreDefault(autoShareUpdate bool, fn func() error) error {
|
||||
return r.withLocalStoreUpdateLocked(boolShareUpdateMode(autoShareUpdate), false, fn)
|
||||
}
|
||||
|
||||
func (r *runtime) withLocalStoreDefaultLocked(autoShareUpdate, lockDB bool, fn func() error) error {
|
||||
return r.withLocalStoreUpdateLocked(boolShareUpdateMode(autoShareUpdate), lockDB, fn)
|
||||
}
|
||||
|
||||
func (r *runtime) withLocalStoreRead(autoShareUpdate bool, fn func() error) error {
|
||||
return r.withLocalStoreReadUpdate(boolShareUpdateMode(autoShareUpdate), fn)
|
||||
}
|
||||
|
||||
@ -464,7 +464,7 @@ func manifestFromGitHistory(ctx context.Context, repoPath string, generatedAt ti
|
||||
if err != nil {
|
||||
return Manifest{}, err
|
||||
}
|
||||
for _, hash := range strings.Fields(out) {
|
||||
for hash := range strings.FieldsSeq(out) {
|
||||
body, err := output(ctx, repoPath, "git", "show", hash+":"+ManifestName)
|
||||
if err != nil {
|
||||
continue
|
||||
@ -542,7 +542,7 @@ func gitTreeFiles(ctx context.Context, repoPath, rev string) (map[string]gitTree
|
||||
return nil, err
|
||||
}
|
||||
files := map[string]gitTreeFile{}
|
||||
for _, line := range strings.Split(out, "\n") {
|
||||
for line := range strings.SplitSeq(out, "\n") {
|
||||
fields := strings.Fields(line)
|
||||
if len(fields) < 5 {
|
||||
continue
|
||||
|
||||
@ -776,7 +776,7 @@ func TestShareSmallHelpersAndValidation(t *testing.T) {
|
||||
require.Equal(t, "blob", exportValue([]byte("blob")))
|
||||
require.Equal(t, "plain", exportValue("plain"))
|
||||
require.Equal(t, int64(42), importValue(json.Number("42")))
|
||||
require.Equal(t, 3.5, importValue(json.Number("3.5")))
|
||||
require.InDelta(t, 3.5, importValue(json.Number("3.5")), 0)
|
||||
require.Equal(t, "nope", importValue(json.Number("nope")))
|
||||
require.Equal(t, "plain", importValue("plain"))
|
||||
require.Equal(t, "plain", stringValue("plain"))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user