docs

package
v3.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package docs generate application documents as markdown files or postman collection and so on.

Index

Constants

View Source
const (
	CmdDesc = "Generate application documents as markdown files or postman collection and so on"
	CmdName = "docs"

	OptAdapter        = "adapter"
	OptAdapterByte    = 'a'
	OptAdapterDesc    = "Specify document formatter, accept: postman, markdown"
	OptAdapterDefault = "markdown"

	OptBase        = "base"
	OptBaseByte    = 'b'
	OptBaseDesc    = "Specify your working base path"
	OptBaseDefault = "./"

	OptController        = "controller"
	OptControllerByte    = 'c'
	OptControllerDesc    = "Specify your controller path"
	OptControllerDefault = "/app/controllers"

	OptDocument        = "document"
	OptDocumentByte    = 'd'
	OptDocumentDesc    = "Built documents storage location"
	OptDocumentDefault = "/docs/api"
)

Variables

This section is empty.

Functions

func New

func New() (managers.Command, error)

New function create and return instance.

go run main.go docs \
  --adapter=markdown \
  --base=./ \
  --controller=/app/controllers \
  --document=/docs/api

Types

type Command

type Command struct {
	Command managers.Command
	Err     error
	Name    string
}

func (*Command) Handle

func (o *Command) Handle(_ managers.Manager, _ managers.Arguments) (err error)

Handle callable registered on command manager interface.

func (*Command) InitField

func (o *Command) InitField() *Command

func (*Command) InitOption

func (o *Command) InitOption() *Command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL