generics

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2023 License: MIT Imports: 0 Imported by: 0

README

generics

import "github.com/princjef/gomarkdoc/testData/generics"

Index

func Func

func Func[S int | float64](s S) S

Func is a generic function.

type Generic

Generic is a generic struct.

type Generic[T any] struct {
    Field T
}

func NewGeneric
func NewGeneric[T any](param T) Generic[T]

NewGeneric produces a new Generic struct.

func (Generic[T]) Method
func (g Generic[T]) Method()

Method is a method of a generic type.

Generated by gomarkdoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Func

func Func[S int | float64](s S) S

Func is a generic function.

Types

type Generic

type Generic[T any] struct {
	Field T
}

Generic is a generic struct.

func NewGeneric

func NewGeneric[T any](param T) Generic[T]

NewGeneric produces a new Generic struct.

func (Generic[T]) Method

func (g Generic[T]) Method()

Method is a method of a generic type.

Jump to

Keyboard shortcuts

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