example package - github.com/hamdiBouhani/my-playground-project/example - Go Packages

example

package
v0.0.0-...-6e14177 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HelloWorld

func HelloWorld(w http.ResponseWriter, r *http.Request)

func Last

func Last[T any](s []T) T

func LastInt

func LastInt(s []int) int

func LastString

func LastString(s []string) string

func MapKeys

func MapKeys[K comparable, V any](m map[K]V) []K

Generics

Types

type List

type List[T any] struct {
	// contains filtered or unexported fields
}

List is a singly-linked list with values of any type.

func (*List[T]) GetAll

func (lst *List[T]) GetAll() []T

func (*List[T]) Push

func (lst *List[T]) Push(v T)

Jump to

Keyboard shortcuts

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