%s
\n", title) 134 | } 135 | 136 | // GFMAccordionTerminator generates the code necessary to terminate an 137 | // accordion after the body. It is expected to be used in conjunction with 138 | // GFMAccordionHeader(). See GFMAccordionHeader for a full description. 139 | func GFMAccordionTerminator() string { 140 | return "
\n63 | 64 | 65 | 66 | ```go 67 | package main 68 | 69 | import ( 70 | "fmt" 71 | 72 | "github.com/princjef/gomarkdoc/testData/lang/function" 73 | ) 74 | 75 | func main() { 76 | // Comment 77 | res, _ := function.Standalone(2, "abc") 78 | fmt.Println(res) 79 | } 80 | ``` 81 | 82 | #### Output 83 | 84 | ``` 85 | 2 86 | ``` 87 | 88 |
89 |93 | 94 | 95 | 96 | ```go 97 | package main 98 | 99 | import ( 100 | "fmt" 101 | 102 | "github.com/princjef/gomarkdoc/testData/lang/function" 103 | ) 104 | 105 | func main() { 106 | res, _ := function.Standalone(0, "def") 107 | fmt.Println(res) 108 | } 109 | ``` 110 | 111 | #### Output 112 | 113 | ``` 114 | 0 115 | ``` 116 | 117 |
118 |140 | 141 | 142 | 143 | ```go 144 | package main 145 | 146 | import ( 147 | "github.com/princjef/gomarkdoc/testData/lang/function" 148 | ) 149 | 150 | func main() { 151 | r := function.Generic[int]{} 152 | r.WithGenericReceiver() 153 | } 154 | ``` 155 | 156 |
157 |170 | 171 | 172 | 173 | ```go 174 | package main 175 | 176 | import ( 177 | "fmt" 178 | 179 | "github.com/princjef/gomarkdoc/testData/lang/function" 180 | ) 181 | 182 | func main() { 183 | // Add some comments 184 | r := &function.Receiver{} 185 | // And some more 186 | fmt.Println(r) 187 | } 188 | ``` 189 | 190 |
191 |195 | 196 | 197 | 198 | ```go 199 | package main 200 | 201 | import ( 202 | "github.com/princjef/gomarkdoc/testData/lang/function" 203 | ) 204 | 205 | func main() { 206 | var r function.Receiver 207 | r.WithReceiver() 208 | } 209 | ``` 210 | 211 |
212 |63 | 64 | 65 | 66 | ```go 67 | package main 68 | 69 | import ( 70 | "fmt" 71 | 72 | "github.com/princjef/gomarkdoc/testData/lang/function" 73 | ) 74 | 75 | func main() { 76 | // Comment 77 | res, _ := function.Standalone(2, "abc") 78 | fmt.Println(res) 79 | } 80 | ``` 81 | 82 | #### Output 83 | 84 | ``` 85 | 2 86 | ``` 87 | 88 |
89 |93 | 94 | 95 | 96 | ```go 97 | package main 98 | 99 | import ( 100 | "fmt" 101 | 102 | "github.com/princjef/gomarkdoc/testData/lang/function" 103 | ) 104 | 105 | func main() { 106 | res, _ := function.Standalone(0, "def") 107 | fmt.Println(res) 108 | } 109 | ``` 110 | 111 | #### Output 112 | 113 | ``` 114 | 0 115 | ``` 116 | 117 |
118 |140 | 141 | 142 | 143 | ```go 144 | package main 145 | 146 | import ( 147 | "github.com/princjef/gomarkdoc/testData/lang/function" 148 | ) 149 | 150 | func main() { 151 | r := function.Generic[int]{} 152 | r.WithGenericReceiver() 153 | } 154 | ``` 155 | 156 |
157 |170 | 171 | 172 | 173 | ```go 174 | package main 175 | 176 | import ( 177 | "fmt" 178 | 179 | "github.com/princjef/gomarkdoc/testData/lang/function" 180 | ) 181 | 182 | func main() { 183 | // Add some comments 184 | r := &function.Receiver{} 185 | // And some more 186 | fmt.Println(r) 187 | } 188 | ``` 189 | 190 |
191 |195 | 196 | 197 | 198 | ```go 199 | package main 200 | 201 | import ( 202 | "github.com/princjef/gomarkdoc/testData/lang/function" 203 | ) 204 | 205 | func main() { 206 | var r function.Receiver 207 | r.WithReceiver() 208 | } 209 | ``` 210 | 211 |
212 |