Getting started
Install
As a library, to call from your own program:
codescan exposes a deliberately small surface: a single Run function and an
Options struct.
Or as a command, to run in a build or a pipeline:
Or as a terminal front-end, to watch a spec take shape as you annotate:
If you just want to experiment, learn or reproduce an issue you’re currently having, the easiest way is to try our Playground in your browser.
Ways to use codescan
Import codescan, annotate a package.
Produce a Swagger 2.0 specification from your Go program.
- Point genspec at annotated Go source and get a Swagger 2.0 document — on standard output, in a file, checked against the schema, or as a machine-readable envelope from a sandbox with no Go toolchain in it.
Drive codescan interactively: browse an annotated source tree, watch the spec it produces.
It re-renders on every save, and follow any node back to the code that made it.
All three drive the same scanner over the same annotations, and every knob is spelled the same way in each, so the terminal UI shows exactly the document your build will produce.
See Setting an option.