gomarkdown

command
v0.0.0-...-43c8ab9 Latest Latest
Warning

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

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

README

cloudeng.io/go/cmd/gomarkdown

CircleCI Go Report Card

Usage of gomarkdown

gomarkdown is a utility for generating markdown from go source comments. It mirrors the behaviour of go doc but producing markdown output instead. It is most useful for packages hosted on github since github will automatically render the README.md in each directory.

gomarkdown can be applied to multiple packages and will generate a README.md for each package in that package's directory.

For example, the following will generate a README.md in every package and command under ./...

go run cloudeng.io/go/cmd/`gomarkdown` --overwrite ./...

In addition gomarkdown can be used to generate markdown for command line packages. In doing so it employs simple heurestics to format package comments.

- lines with fewer than 5 words that end in a : are treated as headings.
- all occurrences of the command's name are highlighted.

Command line flags

-circleci string
  	set to the circleci project to insert a circleci build badge
-gopkg string
  	link to this site for full godoc and godoc examples (default "pkg.go.dev")
-goreportcard
  	insert a link to goreportcard.com
-markdown string
  	markdown style to use, currently only github is supported. (default "github")
-md-output string
  	name of markdown output file. (default "README.md")
-overwrite
  	overwrite existing file.

Documentation

Overview

Usage of gomarkdown:

gomarkdown is a utility for generating markdown from go source comments. It mirrors the behaviour of go doc but producing markdown output instead. It is most useful for packages hosted on github since github will automatically render the README.md in each directory.

gomarkdown can be applied to multiple packages and will generate a README.md for each package in that package's directory.

For example, the following will generate a README.md in every package and command under ./...

go run cloudeng.io/go/cmd/gomarkdown --overwrite ./...

In addition gomarkdown can be used to generate markdown for command line packages. In doing so it employs simple heurestics to format package comments.

  • lines with fewer than 5 words that end in a : are treated as headings.
  • all occurrences of the command's name are highlighted.

Command line flags:

-circleci string
  	set to the circleci project to insert a circleci build badge
-gopkg string
  	link to this site for full godoc and godoc examples (default "pkg.go.dev")
-goreportcard
  	insert a link to goreportcard.com
-markdown string
  	markdown style to use, currently only github is supported. (default "github")
-md-output string
  	name of markdown output file. (default "README.md")
-overwrite
  	overwrite existing file.

Jump to

Keyboard shortcuts

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