docs: add godoc comments to all exported functions and methods

This commit is contained in:
adman
2026-07-30 00:20:55 +02:00
parent 56c97a2b3f
commit 0d6b6e1ab9
50 changed files with 186 additions and 408 deletions
+3
View File
@@ -7,6 +7,7 @@ import (
var boundaries = []rune{' ', '_', '-', '.', ',', ';', ':', '(', ')', '[', ']', '{', '}'}
// CamelCase converts a string with word boundaries to CamelCase.
func CamelCase(s string) string {
ret := ""
atWordBoundary := true
@@ -24,6 +25,7 @@ func CamelCase(s string) string {
return ret
}
// SnakeCase converts a CamelCase string to snake_case.
func SnakeCase(s string) string {
ret := ""
for i, c := range s {
@@ -38,6 +40,7 @@ func SnakeCase(s string) string {
return ret
}
// FirstLetterLower returns the string with the first rune lowercased.
func FirstLetterLower(s string) string {
return string(unicode.ToLower(rune(s[0]))) + s[1:]
}