commenteraser

command
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 10 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL