From 5dd4df1ba3d6f07c8f21a3e7511db52103ff7f6d Mon Sep 17 00:00:00 2001 From: moul <94029+moul@users.noreply.github.com> Date: Tue, 10 Dec 2024 12:01:36 +0100 Subject: [PATCH] chore: fixup Signed-off-by: moul <94029+moul@users.noreply.github.com> --- .../gno.land/p/moul/typeutil/typeutil.gno | 129 ------------------ 1 file changed, 129 deletions(-) diff --git a/examples/gno.land/p/moul/typeutil/typeutil.gno b/examples/gno.land/p/moul/typeutil/typeutil.gno index 949b20d551a..1fa79b94549 100644 --- a/examples/gno.land/p/moul/typeutil/typeutil.gno +++ b/examples/gno.land/p/moul/typeutil/typeutil.gno @@ -259,119 +259,6 @@ func join(slice interface{}) string { return b.String() } -// Helper functions for joining slices -func joinStrings(slice []string) string { - if len(slice) == 0 { - return "[]" - } - var b strings.Builder - b.WriteString("[") - for i, s := range slice { - if i > 0 { - b.WriteString(" ") - } - b.WriteString(s) - } - b.WriteString("]") - return b.String() -} - -func joinInts(slice []int) string { - if len(slice) == 0 { - return "[]" - } - var b strings.Builder - b.WriteString("[") - for i, num := range slice { - if i > 0 { - b.WriteString(" ") - } - b.WriteString(strconv.Itoa(num)) - } - b.WriteString("]") - return b.String() -} - -func joinInt32s(slice []int32) string { - if len(slice) == 0 { - return "[]" - } - var b strings.Builder - b.WriteString("[") - for i, num := range slice { - if i > 0 { - b.WriteString(" ") - } - b.WriteString(strconv.FormatInt(int64(num), 10)) - } - b.WriteString("]") - return b.String() -} - -func joinInt64s(slice []int64) string { - if len(slice) == 0 { - return "[]" - } - var b strings.Builder - b.WriteString("[") - for i, num := range slice { - if i > 0 { - b.WriteString(" ") - } - b.WriteString(strconv.FormatInt(num, 10)) - } - b.WriteString("]") - return b.String() -} - -func joinFloat32s(slice []float32) string { - if len(slice) == 0 { - return "[]" - } - var b strings.Builder - b.WriteString("[") - for i, num := range slice { - if i > 0 { - b.WriteString(" ") - } - b.WriteString(strconv.FormatFloat(float64(num), 'f', -1, 32)) - } - b.WriteString("]") - return b.String() -} - -func joinFloat64s(slice []float64) string { - if len(slice) == 0 { - return "[]" - } - var b strings.Builder - b.WriteString("[") - for i, num := range slice { - if i > 0 { - b.WriteString(" ") - } - b.WriteString(strconv.FormatFloat(num, 'f', -1, 64)) - } - b.WriteString("]") - return b.String() -} - -func joinInterfaces(slice []interface{}) string { - if len(slice) == 0 { - return "[]" - } - var b strings.Builder - b.WriteString("[") - for i, v := range slice { - if i > 0 { - b.WriteString(" ") - } - b.WriteString(ToString(v)) - } - b.WriteString("]") - return b.String() -} - func joinTimes(slice []time.Time) string { if len(slice) == 0 { return "[]" @@ -420,22 +307,6 @@ func joinBytes(slice [][]byte) string { return b.String() } -func joinStringers(slice []stringer) string { - if len(slice) == 0 { - return "[]" - } - var b strings.Builder - b.WriteString("[") - for i, s := range slice { - if i > 0 { - b.WriteString(" ") - } - b.WriteString(s.String()) - } - b.WriteString("]") - return b.String() -} - // ToBool converts any value to a boolean based on common programming conventions. // For example: // - Numbers: 0 is false, any other number is true