refactor(pkg): merge pkg/utils into pkg/util

Consolidate pure helper packages under pkg/util and update imports.
This commit is contained in:
ryan
2026-07-24 15:45:10 +08:00
parent 33a1c32cf8
commit d99c5b7c43
14 changed files with 19 additions and 19 deletions
+16
View File
@@ -0,0 +1,16 @@
package util
import "fmt"
// Interface2String converts a string, int, or float64 value to its string representation.
func Interface2String(inter interface{}) string {
switch v := inter.(type) {
case string:
return v
case int:
return fmt.Sprintf("%d", v)
case float64:
return fmt.Sprintf("%f", v)
}
return "Not Implemented"
}