{"modulePath":"github.com/osapi-io/osapi","version":"v0.3.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package reference\n\nPackage reference writes the CLI reference pages of the docs site from the cobra command tree. Each command has one page: a group page that lists its subcommands, or a leaf page with its usage, examples and flags.\n\n## Constants\n\n```go\nconst (\n\t// Result tells what the command reports: when it returns changed: true\n\t// or false, and when it fails.\n\tResult = \"osapi.docs.result\"\n\t// Permission is the permission that the command needs, for example\n\t// node:write.\n\tPermission = \"osapi.docs.permission\"\n\t// Notes is more detail for the docs site. Use it rarely.\n\tNotes = \"osapi.docs.notes\"\n)\n```\nThe keys of the annotations of a command that its page shows. --help does not show them, so a page has detail that a terminal does not need.\n\n## Variables\n\n```go\nvar Keep = []string{\"output.md\"}\n```\nKeep names the pages in the directory that a person writes. Write does not delete them.\n\n## Functions\n\n```go\nfunc Page(\n\tc *cobra.Command,\n\tpath []string,\n\tsubs []*cobra.Command,\n) string\n```\nPage returns the markdown of the page of c. subs are its documented subcommands: a command that has some gets a group page.\n\n```go\nfunc Title(\n\tname string,\n) string\n```\nTitle is the title of the page of a command: its name, with each word capitalized and each acronym in capitals.\n\n```go\nfunc Write(\n\troot *cobra.Command,\n\tdir string,\n) (int, error)\n```\nWrite writes the page of each command under root into dir, and removes each page in dir that no command has, except the pages in Keep. It is the count of the pages it wrote.\n\n","path":"github.com/osapi-io/osapi/internal/cli/reference","name":"reference","synopsis":"Package reference writes the CLI reference pages of the docs site from the cobra command tree.","isRedistributable":true}
