Skip to content

Commit

Permalink
code > Check
Browse files Browse the repository at this point in the history
  • Loading branch information
fluffy-melli committed Jan 11, 2025
1 parent 821192d commit dd5d425
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions korcen.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,23 @@ import (
// | | (_| | | | | (_| | |_
// |_|\__,_|_| |_|\__,_|\__|

type CheckInfo struct {
Detect bool
Type int
}

const (
DNone int = iota
DGeneral
DMinor
DSexual
DBelittle
DRace
DParent
DSpecial
DPolitics
)

func ChangeUnicode(unicode string) string {
unicode = strings.ReplaceAll(unicode, "𝗌", "s")
unicode = strings.ReplaceAll(unicode, "𝗌", "s")
Expand Down Expand Up @@ -1437,3 +1454,61 @@ func Politics(input string) bool {

return false
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

func Check(input string) CheckInfo {
if General(input) {
return CheckInfo{
Detect: true,
Type: DGeneral,
}
}
if Minor(input) {
return CheckInfo{
Detect: true,
Type: DMinor,
}
}
if Sexual(input) {
return CheckInfo{
Detect: true,
Type: DSexual,
}
}
if Belittle(input) {
return CheckInfo{
Detect: true,
Type: DBelittle,
}
}
if Race(input) {
return CheckInfo{
Detect: true,
Type: DRace,
}
}
if Parent(input) {
return CheckInfo{
Detect: true,
Type: DParent,
}
}
if Special(input) {
return CheckInfo{
Detect: true,
Type: DSpecial,
}
}
if Politics(input) {
return CheckInfo{
Detect: true,
Type: DPolitics,
}
}

return CheckInfo{
Detect: false,
Type: DNone,
}
}

0 comments on commit dd5d425

Please sign in to comment.