diff --git a/codes/go/pkg/print_utils.go b/codes/go/pkg/print_utils.go index 3d9b83a29..a42d48b2f 100644 --- a/codes/go/pkg/print_utils.go +++ b/codes/go/pkg/print_utils.go @@ -11,7 +11,8 @@ import ( "strings" ) -func PrintSlice(nums []int) { +// PrintSlice Print a slice +func PrintSlice[T any](nums []T) { fmt.Printf("%v", nums) fmt.Println() }