github.com/anthonyme00/gomarkdoc@v1.0.0/testData/generics/README-plain.md (about) 1 <!-- Code generated by gomarkdoc. DO NOT EDIT --> 2 3 # generics 4 5 import "github.com/anthonyme00/gomarkdoc/testData/generics" 6 7 ## Index 8 9 - [func Func\[S int | float64\]\(s S\) S](<#Func>) 10 - [type Generic](<#Generic>) 11 - [func NewGeneric\[T any\]\(param T\) Generic\[T\]](<#NewGeneric>) 12 - [func \(g Generic\[T\]\) Method\(\)](<#Generic[T].Method>) 13 14 15 <a name="Func"></a> 16 ## func Func 17 18 func Func[S int | float64](s S) S 19 20 Func is a generic function. 21 22 <a name="Generic"></a> 23 ## type Generic 24 25 Generic is a generic struct. 26 27 type Generic[T any] struct { 28 Field T 29 } 30 31 <a name="NewGeneric"></a> 32 ### func NewGeneric 33 34 func NewGeneric[T any](param T) Generic[T] 35 36 NewGeneric produces a new [Generic](<#Generic>) struct. 37 38 <a name="Generic[T].Method"></a> 39 ### func \(Generic\[T\]\) Method 40 41 func (g Generic[T]) Method() 42 43 Method is a method of a generic type. 44 45 Generated by [gomarkdoc](<https://github.com/princjef/gomarkdoc>)