The contrast-go build tool accepts options that control how it instruments your application as it builds. Most of these options are for debugging only and can cause build errors or break Contrast functionality.
contrast-go [options] [build|help|install|run|version] [build flags] [packages]
These build time flags are supported:
| Option | Default | What it does |
|---|---|---|
| off | Verbose logging in JSON format. |
| off | Very verbose rewriter logging in JSON format. This produces a lot of output. |
-d | off | Dry run of the rewriting, for workflow validation. |
-nodeps | off | Instruments only packages within the target package's module and excludes dependencies. |
-save | off | Keeps the contrast-go temporary directory after the build. |
-version | off | Prints the contrast-go version and exits. |
-dataflow | on | Enables dataflow rewrites for Assess. |
-ecu | on | Enables ECU rewrites. |
-gostmts | on | Enables go statement rewrites for context propagation. |
-events | on | Enables rewrites that emit code events. |
-go | go | Overrides the command used to run Go. |
Note
Use -h to get help.