Documentation
¶
Overview ¶
Command commenteraser removes non-directive Go comments in place and gofmts the result. It preserves compiler/tool directives (//go:build, //go:generate, //go:embed, //nolint:..., //line, //export, //extern) and the cgo `import "C"` preamble, since stripping those would change the build. Skips generated files.
Used by `./dev strip-comments`. Pass the Go files to process as arguments.
Click to show internal directories.
Click to hide internal directories.