Documentation
¶
Index ¶
Constants ¶
View Source
const ( SloNameArgument = "--slo" SuccessObjArgument = "--success-target" LatencyMsArgument = "--latency-ms" LatencyObjArgument = "--latency-target" NoDocArgument = "--no-doc" AmPromPackage = "\"github.com/autometrics-dev/autometrics-go/prometheus/autometrics\"" AmOtelPackage = "\"github.com/autometrics-dev/autometrics-go/otel/autometrics\"" )
Variables ¶
This section is empty.
Functions ¶
func GenerateDocumentationAndInstrumentation ¶
func GenerateDocumentationAndInstrumentation(ctx internal.GeneratorContext, sourceCode, moduleName string) (string, error)
GenerateDocumentationAndInstrumentation takes the raw source code from a file and generates the documentation for the `//autometrics:inst` functions.
It returns the new source code with augmented documentation.
func TransformFile ¶
func TransformFile(ctx internal.GeneratorContext, path, moduleName string) error
TransformFile takes a file path and generates the documentation for the `//autometrics:inst` functions.
It also replaces the file in place.
Types ¶
type GenerateError ¶ added in v0.9.0
type GenerateErrors ¶ added in v0.9.0
type GenerateErrors []GenerateError
func (GenerateErrors) Error ¶ added in v0.9.0
func (errs GenerateErrors) Error() string
Click to show internal directories.
Click to hide internal directories.