mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-13 01:02:28 +08:00
refactor: remove unused code
This commit is contained in:
@@ -75,7 +75,6 @@ func (q *CircularQueue[T]) EnQueue(value T) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
q.data[q.rear] = value
|
q.data[q.rear] = value
|
||||||
// q.data = append(q.data, value)
|
|
||||||
q.rear = (q.rear + 1) % q.size
|
q.rear = (q.rear + 1) % q.size
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -30,18 +30,8 @@ func ContainSubSlice[T any](slice, subslice []T) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true
|
|
||||||
|
|
||||||
// unique := make(map[T]bool)
|
return true
|
||||||
// for _, v := range slice {
|
|
||||||
// unique[v] = true
|
|
||||||
// }
|
|
||||||
// for _, v := range subslice {
|
|
||||||
// if !unique[v] {
|
|
||||||
// return false
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Chunk creates an slice of elements split into groups the length of size.
|
// Chunk creates an slice of elements split into groups the length of size.
|
||||||
|
|||||||
@@ -234,11 +234,6 @@ func IsStrongPassword(password string, length int) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return num && lower && upper && special
|
return num && lower && upper && special
|
||||||
|
|
||||||
// go doesn't support regexp (?=re)
|
|
||||||
//pattern := `^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[@#$%^&+=])(?=\S+$).$`
|
|
||||||
//reg := regexp.MustCompile(pattern)
|
|
||||||
//return reg.MatchString(password)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsWeakPassword check if the string is weak password
|
// IsWeakPassword check if the string is weak password
|
||||||
|
|||||||
Reference in New Issue
Block a user