

nogocomments: Instantly Remove Comments from Your Go Code
nogocomments is a command-line tool designed to simplify the process
of removing comments from Go source code. Whether you're preparing code
snippets for sharing, streamlining code reviews, or simply trying to
frustrate a co-worker, nogocomments is a fast and reliable solution. By
focusing on efficiency and simplicity, it ensures that your code is ready
for any context where comments might not be needed.
| Before |
After |
 |
 |
Start streamlining your Go code today with nogocomments!
Table of Contents
Installation
Precompiled Binaries
Download precompiled binaries for your platform from the
Releases page.
Clone and Build
For manual builds, clone the repository and build using go build. This
requires Go to be installed.
git clone https://github.com/pierow2k/nogocomments.git
cd nogocomments
go build
Usage
Each nogocomments release ships with a man page in troff (standard man
page) format and PDF format.
nogocomments [OPTIONS]
Options
| Option |
Description |
--debug |
Enable debug level logging for verbose output. |
--file <path> |
Specify the file path containing Go source code. |
--paste |
Read Go source code from the system clipboard. |
--version |
Display version and build information. |
Examples
Remove comments from Go source code copied to the clipboard:
nogocomments --paste
Process comments from a Go source file and output to the terminal:
nogocomments --file /path/to/your/file.go
Write processed output to a new file:
nogocomments --file /path/to/your/source.go > newfile.go
Enable debug mode for detailed logs:
nogocomments --debug --file /path/to/your/file.go
Contributing
We love community contributions! Here's how you can get involved:
- Report Issues: Found a bug or have a feature request? Let us know by
opening an issue.
- Submit a Pull Request: If you've improved the tool or fixed an issue,
submit a pull request.
Contributions are always welcome!
Your feedback and contributions make nogocomments better for everyone.
Thank you for helping grow and refine this project!
License
This project is licensed under the MIT License. See the LICENSE
file for details.