refactor and typo fixes

This commit is contained in:
yusing
2024-11-02 03:14:47 +08:00
parent 76454df5e6
commit a86d316d07
34 changed files with 160 additions and 128 deletions

View File

@@ -2,6 +2,7 @@ package strutils
import (
"fmt"
"strconv"
"strings"
"time"
@@ -57,6 +58,10 @@ func ParseBool(s string) bool {
}
}
func PortString(port uint16) string {
return strconv.FormatUint(uint64(port), 10)
}
func DoYouMean(s string) string {
return "Did you mean " + ansi.HighlightGreen + s + ansi.Reset + "?"
}