nogocomments

command module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: MIT Imports: 8 Imported by: 0

README

nogocomments

nogocomments Banner
Go Version License Dependency Status Codacy Badge

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
nogocomments Banner nogocomments Banner

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.

Documentation

Overview

Package main provides a CLI tool to remove comments from Go source code.

Directories

Path Synopsis
internal
commentremover
Package commentremover provides a utility for removing comments from Go source code.
Package commentremover provides a utility for removing comments from Go source code.
filereader
Package filereader provides abstractions for reading files, enabling easier testing and flexible file reading strategies.
Package filereader provides abstractions for reading files, enabling easier testing and flexible file reading strategies.

Jump to

Keyboard shortcuts

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