fix(healthcheck/reposize): camel name style
All checks were successful
build / build (push) Successful in 1m13s
build / trigger-build-image (push) Has been skipped
build / build (pull_request) Successful in 1m11s
build / trigger-build-image (pull_request) Has been skipped

This commit is contained in:
zzjc1234 2024-10-12 18:01:20 +08:00
parent 74ad5d6a8a
commit aa2969a82f

View File

@ -10,7 +10,7 @@ import (
// RepoSize checks the size of the repository to determine if it is oversized. // RepoSize checks the size of the repository to determine if it is oversized.
// It executes the 'git count-objects -v' command to obtain the size information, // It executes the 'git count-objects -v' command to obtain the size information,
func RepoSize(conf_size float64) error { func RepoSize(confSize float64) error {
// TODO: reimplement here when go-git is available // TODO: reimplement here when go-git is available
// https://github.com/go-git/go-git/blob/master/COMPATIBILITY.md // https://github.com/go-git/go-git/blob/master/COMPATIBILITY.md
cmd := exec.Command("git", "count-objects", "-v") cmd := exec.Command("git", "count-objects", "-v")
@ -33,8 +33,8 @@ func RepoSize(conf_size float64) error {
sum += size sum += size
} }
} }
if sum > int(conf_size*1024) { if sum > int(confSize*1024) {
return fmt.Errorf("Repository larger than %.1f Mib. Please clean up or contact the teaching team.", conf_size) return fmt.Errorf("Repository larger than %.1f Mib. Please clean up or contact the teaching team.", confSize)
} }
return nil return nil
} }