Documentation
¶
Overview ¶
Package markdown allows versions to be rendered as basic Flavored Markdown, supported by GitLab and GitHub.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Markdown ¶
type Markdown struct {
// contains filtered or unexported fields
}
Markdown renders versions as basic flavored Markdown.
func NewMarkdown ¶
NewMarkdown instantiates a new template for rendering in Markdown.
type ModulesSorting ¶
type ModulesSorting uint
ModulesSorting is the enum for sorting modules options.
const ( // ModulesSortingAsInput indicates modules are rendered in the order they // were parsed. ModulesSortingAsInput ModulesSorting = iota // ModulesSortingAlphabetically indicates modules are rendered alphabetically // by their name. ModulesSortingAlphabetically )
type Option ¶
type Option func(*Markdown)
Option is configuration option for this renderer.
func WithModulesSorting ¶
func WithModulesSorting(opt ModulesSorting) Option
WithModulesSorting allows specifyig the sorting option for modules.
func WithPackagesLicense ¶
WithPackagesLicense allows display the package License when present.
func WithPackagesSorting ¶
func WithPackagesSorting(opt PackagesSorting) Option
WithPackagesSorting allows specifying the sorting option for packages.
type PackagesSorting ¶
type PackagesSorting uint
PackagesSorting is the enum for sorting packages options.
const ( // PackagesSortingAsFound indicates packages are not sorted and // instead they are rendered in the order the were found. PackagesSortingAsFound PackagesSorting = iota // PackagesSortingAlphabeticallySupported indicates packages are sorted // alphabetically in two groups by their name. The first group includes all // modules having the same version. The second group includes all modules // having different versions. PackagesSortingAlphabeticallySupported // PackagesSortingAlphabetically indicates packages are sorted alphabetically // by their name. PackagesSortingAlphabetically )
Click to show internal directories.
Click to hide internal directories.