mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-30 10:04:52 +02:00
fixing lint fmt errors
This commit is contained in:
@@ -95,7 +95,7 @@ func TestGetFileSize(t *testing.T) {
|
||||
var size int64 = 512 * 1024 * 1024 * 1024
|
||||
s, err := GetFileSize("512 GiB")
|
||||
assert.Equal(t, s, size)
|
||||
assert.Nil(t, err)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestStringsToInt64s(t *testing.T) {
|
||||
|
||||
+1
-1
@@ -268,7 +268,7 @@ func CountObjectsWithEnv(ctx context.Context, repoPath string, env []string) (*C
|
||||
// parseSize parses the output from count-objects and return a CountObject
|
||||
func parseSize(objects string) *CountObject {
|
||||
repoSize := new(CountObject)
|
||||
for _, line := range strings.Split(objects, "\n") {
|
||||
for line := range strings.SplitSeq(objects, "\n") {
|
||||
switch {
|
||||
case strings.HasPrefix(line, statCount):
|
||||
repoSize.Count, _ = strconv.ParseInt(line[7:], 10, 64)
|
||||
|
||||
Reference in New Issue
Block a user