default config actually does something now. also print > fmt.Print

This commit is contained in:
echo 2022-09-10 11:01:27 +04:30 committed by nea
parent 7270f98d31
commit 9935e437d6
No known key found for this signature in database
GPG key ID: AA563E93EB628D91
4 changed files with 23 additions and 8 deletions

View file

@ -56,25 +56,26 @@ func initLine() {
logoLine := logoLines[logoIndex]
logoLineLength := len([]rune(logoLine))
padding := strings.Repeat(" ", logoWidth-logoLineLength)
fmt.Printf("%s%s", logoLine, padding)
print(logoLine, padding)
logoIndex += 1
} else {
fmt.Printf("%s", strings.Repeat(" ", logoWidth))
print(strings.Repeat(" ", logoWidth))
}
}
}
func UwuPrint(message string, noUwuOverride bool) {
//will add color eventually, my brain hurts
initLine()
if noUwuOverride || !shouldUwuify {
fmt.Printf("%s", message)
print(message)
return
}
words := strings.Split(message, " ")
hadAnyContent := false
for _, word := range words {
if word == "" {
fmt.Print(" ")
print(" ")
continue
}
word = strings.ReplaceAll(word, "r", "w")
@ -92,11 +93,11 @@ func UwuPrint(message string, noUwuOverride bool) {
word = strings.ReplaceAll(word, "u", "uwu")
}
hadAnyContent = true
fmt.Printf("%s ", word)
print(word)
}
if hadAnyContent && rand.Intn(5) == 0 {
fmt.Printf("%s", uwuEmotes[rand.Intn(len(uwuEmotes))])
print(uwuEmotes[rand.Intn(len(uwuEmotes))])
}
}