github.com/dkischenko/gomarkdoc@v0.0.0-20230516135336-e40deae8a495/testData/docs/README.md (about)

     1  <!-- Code generated by gomarkdoc. DO NOT EDIT -->
     2  
     3  # docs
     4  
     5  ```go
     6  import "github.com/dkischenko/gomarkdoc/testData/docs"
     7  ```
     8  
     9  Package docs exercises the documentation features of golang 1.19 and above at the package documentation level.
    10  
    11  ### This is a heading
    12  
    13  This heading has a paragraph with a reference to the standard library [math/rand](<https://pkg.go.dev/math/rand/>) as well as a function in the file [Func](<#Func>), a type [Type](<#Type>), a type's function [Type.Func](<#Type.Func>), a non\-standard library package [golang.org/x/crypto/bcrypt.Cost](<https://pkg.go.dev/golang.org/x/crypto/bcrypt/#Cost>), an external link [Outside Link](<https://golang.org/doc/articles/json_and_go.html>) and a \[broken link\].
    14  
    15  It also has a numbered list:
    16  
    17  1. First
    18  2. Second
    19  3. Third
    20  
    21  Plus one with blank lines:
    22  
    23  1. First
    24  
    25  2. Second
    26  
    27  3. Third
    28  
    29  Non\-numbered lists
    30  
    31  - First another line
    32  - Second
    33  - Third
    34  
    35  Plus blank lines:
    36  
    37  - First
    38    
    39    another paragraph
    40  
    41  - Second
    42  
    43  - Third
    44  
    45  And a golang code block:
    46  
    47  ```
    48  func GolangCode(t int) int {
    49  	return t + 1
    50  }
    51  ```
    52  
    53  And a random code block:
    54  
    55  ```
    56  something
    57  	preformatted
    58  in a random
    59  		way
    60  ```
    61  
    62  There's also another file with a struct called [AnotherStruct](<#AnotherStruct>) that has additional methods and fields.
    63  
    64  We also have constants like [Constant](<#Constant>) and [Const1](<#Const1>) plus variables like [Var](<#Var>) and and [VarB](<#VarA>).
    65  
    66  ## Index
    67  
    68  - [Constants](<#constants>)
    69  - [Variables](<#variables>)
    70  - [func Func(param int) int](<#Func>)
    71  - [type AnotherStruct](<#AnotherStruct>)
    72    - [func NewAnotherStruct() *AnotherStruct](<#NewAnotherStruct>)
    73    - [func (s *AnotherStruct) GetField() string](<#AnotherStruct.GetField>)
    74  - [type Type](<#Type>)
    75    - [func (t *Type) Func()](<#Type.Func>)
    76  
    77  
    78  ## Constants
    79  
    80  <a name="Const1"></a>This is a constant block
    81  
    82  ```go
    83  const (
    84      Const1 = 1
    85      Const2 = 2
    86      Const3 = 3
    87  )
    88  ```
    89  
    90  <a name="Constant"></a>Constant is a constant.
    91  
    92  ```go
    93  const Constant = 3
    94  ```
    95  
    96  ## Variables
    97  
    98  <a name="VarA"></a>This is a var block
    99  
   100  ```go
   101  var (
   102      VarA = 'a'
   103      VarB = 'b'
   104      VarC = 'c'
   105  )
   106  ```
   107  
   108  <a name="Var"></a>Var is a var.
   109  
   110  ```go
   111  var Var = 2
   112  ```
   113  
   114  <a name="Func"></a>
   115  ## func [Func](<https://github.com/dkischenko/gomarkdoc/blob/master/testData/docs/docs.go#L64>)
   116  
   117  ```go
   118  func Func(param int) int
   119  ```
   120  
   121  Func is present in this file.
   122  
   123  <a name="AnotherStruct"></a>
   124  ## type [AnotherStruct](<https://github.com/dkischenko/gomarkdoc/blob/master/testData/docs/anotherFile.go#L5-L7>)
   125  
   126  AnotherStruct has methods like [\*AnotherStruct.GetField](<#AnotherStruct.GetField>) and also has an initializer called [NewAnotherStruct](<#NewAnotherStruct>).
   127  
   128  ```go
   129  type AnotherStruct struct {
   130      Field string
   131  }
   132  ```
   133  
   134  <a name="NewAnotherStruct"></a>
   135  ### func [NewAnotherStruct](<https://github.com/dkischenko/gomarkdoc/blob/master/testData/docs/anotherFile.go#L10>)
   136  
   137  ```go
   138  func NewAnotherStruct() *AnotherStruct
   139  ```
   140  
   141  NewAnotherStruct\(\) makes [\*AnotherStruct](<#AnotherStruct>).
   142  
   143  <a name="AnotherStruct.GetField"></a>
   144  ### func \(\*AnotherStruct\) [GetField](<https://github.com/dkischenko/gomarkdoc/blob/master/testData/docs/anotherFile.go#L17>)
   145  
   146  ```go
   147  func (s *AnotherStruct) GetField() string
   148  ```
   149  
   150  GetField gets \[\*AnotherStruct.Field\].
   151  
   152  <a name="Type"></a>
   153  ## type [Type](<https://github.com/dkischenko/gomarkdoc/blob/master/testData/docs/docs.go#L69>)
   154  
   155  Type is a type in this file.
   156  
   157  ```go
   158  type Type struct{}
   159  ```
   160  
   161  <a name="Type.Func"></a>
   162  ### func \(\*Type\) [Func](<https://github.com/dkischenko/gomarkdoc/blob/master/testData/docs/docs.go#L72>)
   163  
   164  ```go
   165  func (t *Type) Func()
   166  ```
   167  
   168  TypeFunc is a func within a type in this file.
   169  
   170  Generated by [gomarkdoc](<https://github.com/dkischenko/gomarkdoc>)