Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DocumentationBlockKey = regexp.MustCompile(`<\[\w+\]>`) // regex is valid, so the error is ignored
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
type Arguments struct { // Map where keys are arguments and values are definitions Args map[string]string }
Arguments for documentating code.
type Comment ¶
type Comment struct { // Name of the comment paragraph, like "Example" in `Example` Name string // Optional description of the <`Name`> comment Description Option[string] // Code of the <`Name`> comment Code CodeBlock }
Any other documentation paragraphs.
type Document ¶
type Document struct { // File content Content string // Map of `DocumentationBlock`s Blocks map[string]DocumentationBlock }
Single file structure.
func GenerateEmptyDocumentTemplateIndependent ¶
Function that generates empty documentation file template.
type DocumentationBlock ¶
type DocumentationBlock struct { HashKey string Status FeatureStatus Code CodeBlock Description Option[string] Arguments Arguments Examples []Example Comments []Comment }
Single documentation block.
Fields are in the following order: ¶
1. `CodeBlock`
2. Description for the `CodeBlock`
3. `Arguments` for the `CodeBlock`
4. List of `Example`s
5. Other `Comment`s
type Example ¶
type Example struct { // Optional descripton of the example Description Option[string] // Code of the example Code CodeBlock }
Usage example.
type FeatureStatus ¶
type FeatureStatus string
Feature status
const ( // New feature New FeatureStatus = "New" // Feature is active Active FeatureStatus = "Active" // Feature is Deprecated Deprecated FeatureStatus = "Deprecated" )
Click to show internal directories.
Click to hide internal directories.