Merge pull request '♻️ Simplifies return condition' (#23) from ada/simplifies-return into main
Reviewed-on: #23
This commit is contained in:
commit
eeabb76fdb
1 changed files with 1 additions and 4 deletions
|
@ -33,10 +33,7 @@ func GenerateSecret() string {
|
||||||
|
|
||||||
// CheckCharRedundant verify is a character is redundant in a string
|
// CheckCharRedundant verify is a character is redundant in a string
|
||||||
func CheckCharRedundant(source string, char string) bool { // Verify if a char is redundant
|
func CheckCharRedundant(source string, char string) bool { // Verify if a char is redundant
|
||||||
if strings.Count(source, char) > 1 {
|
return strings.Count(source, char) > 1
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseIntBeforeSeparator(source *string, sep string) (int, error) { // return 0 & error if error, only accept positive number
|
func parseIntBeforeSeparator(source *string, sep string) (int, error) { // return 0 & error if error, only accept positive number
|
||||||
|
|
Loading…
Reference in a new issue