Discover Packages
github.com/df-mc/dragonfly
server
internal
sliceutil
package
Version:
v0.7.0
Opens a new window with list of versions in this module.
Published: Jun 7, 2022
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func Convert[A, B any , S ~[]B](v S) []A
Convert converts a slice of type B to a slice of type A. Convert panics if B cannot be type asserted to type A.
func DeleteVal[E any ](s []E, v E) []E
DeleteVal deletes the first occurrence of a value in a slice of the type E and returns a new slice without the value.
func Index[E any ](s []E, v E) int
Index returns the index of the first occurrence of v in s,
or -1 if not present. Index accepts any type, as opposed to
slices.Index, but might panic if E is not comparable.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.