Skip to content

Auto generate documentation for golang protocol flows etc.

License

Notifications You must be signed in to change notification settings

tvastar/autodoc

Repository files navigation

autodoc

Auto generate documentation for golang protocol flows etc.

Generating http protocol flows into markdown

Autodoc supports recording a http request/response into a markdown file.

        // import "github.com/tvastar/autodoc"

	rec := &autodoc.TransportMarkdownRecorder{
		MarkdownFileName:  "protocol.md",
		SkipHeaders:       autodoc.SkipHeaders{"Date"},
		RequestPreamble:   "## Request\n",
		RequestPostamble:  "\nthat was the request\n",
		ResponsePreamble:  "## Response\n",
		ResponsePostamble: "\nthat was the response\n",
	}
	client := &http.Client{Transport: rec}

	... now use client as a regular http client ...

About

Auto generate documentation for golang protocol flows etc.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages