fix: refactor functions and code (#1559)

This commit is contained in:
Yaodong Yu
2023-02-18 09:31:58 +08:00
committed by GitHub
parent eb72c9f273
commit f2f962b893
9 changed files with 33 additions and 20 deletions

View File

@ -145,7 +145,7 @@ func GetMd5Hash(text string) string {
return hex.EncodeToString(hash[:])
}
func IsStrsEmpty(strs ...string) bool {
func IsStringsEmpty(strs ...string) bool {
for _, str := range strs {
if len(str) == 0 {
return true

View File

@ -183,7 +183,7 @@ func TestIsStrsEmpty(t *testing.T) {
}
for _, scenery := range scenarios {
t.Run(scenery.description, func(t *testing.T) {
actual := IsStrsEmpty(scenery.input...)
actual := IsStringsEmpty(scenery.input...)
assert.Equal(t, scenery.expected, actual, "The returned value not is expected")
})
}