pslice

package
v0.4.88 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2023 License: ISC Imports: 2 Imported by: 0

Documentation

Overview

ConvertSliceToInterface converts a slice of a struct type to a slice of an interface type.

StringifySlice returns the string slice representation of a slice

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertSliceToInterface

func ConvertSliceToInterface[T, G any](structSlice []T) (interfaceSlice []G)

ConvertSliceToInterface converts a slice of a struct type to a slice of an interface type.

  • T is any type
  • G is an interface type that *T implements

If *T does not implement G: runtime panic

func StringifySlice

func StringifySlice[E any](slic []E) (sList []string)

StringifySlice returns the string representation of any slice

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL