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