Documentation
¶
Overview ¶
Package generator generates the testify public API.
It adapts the internal testify API from github.com/go-openapi/testify/v2/internal/assertions and generates the content in packages "assert" and "require".
Index ¶
- type DocGenerator
- type GenerateOption
- func WithIncludeDoc(enabled bool) GenerateOption
- func WithIncludeExamples(enabled bool) GenerateOption
- func WithIncludeFormatFuncs(enabled bool) GenerateOption
- func WithIncludeForwardFuncs(enabled bool) GenerateOption
- func WithIncludeGenerics(enabled bool) GenerateOption
- func WithIncludeHelpers(enabled bool) GenerateOption
- func WithIncludeTests(enabled bool) GenerateOption
- func WithRunnableExamples(enabled bool) GenerateOption
- func WithTargetDoc(dir string) GenerateOption
- func WithTargetPackage(pkg string) GenerateOption
- func WithTargetRoot(dir string) GenerateOption
- type Generator
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocGenerator ¶
type DocGenerator struct {
// contains filtered or unexported fields
}
func NewDocGenerator ¶
func NewDocGenerator(doc model.Documentation, opts ...Option) *DocGenerator
func (*DocGenerator) Generate ¶
func (d *DocGenerator) Generate(opts ...GenerateOption) error
type GenerateOption ¶
type GenerateOption func(*generateOptions)
GenerateOption is an option for code generation.
func WithIncludeDoc ¶
func WithIncludeDoc(enabled bool) GenerateOption
func WithIncludeExamples ¶
func WithIncludeExamples(enabled bool) GenerateOption
func WithIncludeFormatFuncs ¶
func WithIncludeFormatFuncs(enabled bool) GenerateOption
func WithIncludeForwardFuncs ¶
func WithIncludeForwardFuncs(enabled bool) GenerateOption
func WithIncludeGenerics ¶
func WithIncludeGenerics(enabled bool) GenerateOption
func WithIncludeHelpers ¶
func WithIncludeHelpers(enabled bool) GenerateOption
func WithIncludeTests ¶
func WithIncludeTests(enabled bool) GenerateOption
func WithRunnableExamples ¶
func WithRunnableExamples(enabled bool) GenerateOption
func WithTargetDoc ¶
func WithTargetDoc(dir string) GenerateOption
func WithTargetPackage ¶
func WithTargetPackage(pkg string) GenerateOption
func WithTargetRoot ¶
func WithTargetRoot(dir string) GenerateOption
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator generates testify packages (assert, require) from the internal assertions package.
func (*Generator) Documentation ¶
func (g *Generator) Documentation() model.Documentation
Documentation yields the transformed package model as a model.Documentation usable by a generation step by the DocGenerator.
func (*Generator) Generate ¶
func (g *Generator) Generate(opts ...GenerateOption) error
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package domains provides domain-based organization of assertions for documentation generation.
|
Package domains provides domain-based organization of assertions for documentation generation. |
|
Package funcmaps provides template functions for code and documentation generation.
|
Package funcmaps provides template functions for code and documentation generation. |
Click to show internal directories.
Click to hide internal directories.