Documentation
¶
Index ¶
- func BuildCommand() *cobra.Command
- func BuildConfig(configFile string)
- func CheckFile(b *bytes.Buffer, path string) error
- func Compare(r1, r2 io.Reader) (bool, error)
- func DefaultTags() []string
- func EmbedContents(log logger.Logger, fileName string, text string) string
- func GetBuildPackage(path string, tags []string) (*build.Package, error)
- func GetLogLevel(verbosity int) logger.Level
- func IsIgnoredDir(dirname string) bool
- func IsLocalPath(path string) bool
- func LoadPackages(specs []*PackageSpec, opts CommandOptions) error
- func PrintVersion()
- func ResolveFooter(opts CommandOptions) (string, error)
- func ResolveHeader(opts CommandOptions) (string, error)
- func ResolveOutput(specs []*PackageSpec, outputTmpl *template.Template) error
- func ResolveOverrides(opts CommandOptions) ([]gomarkdoc.RendererOption, error)
- func RunCommand(paths []string, opts CommandOptions) error
- func WriteFile(fileName string, text string) error
- func WriteOutput(specs []*PackageSpec, opts CommandOptions) error
- type CommandOptions
- type PackageSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCommand ¶
func BuildConfig ¶
func BuildConfig(configFile string)
func DefaultTags ¶
func DefaultTags() []string
func GetLogLevel ¶
func IsIgnoredDir ¶
IsIgnoredDir identifies if the dir is one we want to intentionally ignore.
func IsLocalPath ¶
func LoadPackages ¶
func LoadPackages(specs []*PackageSpec, opts CommandOptions) error
func PrintVersion ¶
func PrintVersion()
func ResolveFooter ¶
func ResolveFooter(opts CommandOptions) (string, error)
func ResolveHeader ¶
func ResolveHeader(opts CommandOptions) (string, error)
func ResolveOutput ¶
func ResolveOutput(specs []*PackageSpec, outputTmpl *template.Template) error
func ResolveOverrides ¶
func ResolveOverrides(opts CommandOptions) ([]gomarkdoc.RendererOption, error)
func RunCommand ¶
func RunCommand(paths []string, opts CommandOptions) error
func WriteOutput ¶
func WriteOutput(specs []*PackageSpec, opts CommandOptions) error
WriteOutput writes the Output of the documentation to the specified files.
Types ¶
type CommandOptions ¶
type PackageSpec ¶
type PackageSpec struct { // Dir holds the local path where the package is located. If the package is // a remote package, this will always be ".". Dir string // ImportPath holds a representation of the package that should be unique // for most purposes. If a package is on the filesystem, this is equivalent // to the value of Dir. For remote packages, this holds the string used to // import that package in code (e.g. "encoding/json"). ImportPath string IsWildcard bool IsLocal bool OutputFile string Pkg *lang.Package }
PackageSpec defines the data available to the --Output option's template. Information is recomputed for each package generated.
func GetSpecs ¶
func GetSpecs(paths ...string) []*PackageSpec
Click to show internal directories.
Click to hide internal directories.