uncomment

command module
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

README

uncomment

Command uncomment removes comments from Go source files.

Installation

To install/update:

 $ go install modernc.org/uncomment@latest

Verbose output

Add -v to turn on progress tracing and printing out totals.

Keeping godoc comments

Add -keep-godoc to keep comments of exported top level declarations.

Formatting output

Add -gofmt to format the output files.

Example

To remove non-godoc comments in a set of specific files and format the result:

 uncomment -keep-godoc -gofmt lib/sqlite*.go libtest/sqlite*.go

Notes

Input files are overwritten without asking. Be sure to have a backup of your files before using uncomment.

Package comments are not touched.

Bugs

The parser used by uncomment does not yet handle some generic constructs.

Documentation

Overview

Command uncomment removes comments from Go source files.

Installation

To install/update:

$ go install modernc.org/uncomment@latest

Verbose output

Add -v to turn on progress tracing and printing out totals.

Keeping godoc comments

Add -keep-godoc to keep comments of exported top level declarations.

Formatting output

Add -gofmt to format the output files.

Example

To remove non-godoc comments in a set of specific files and format the result:

uncomment -keep-godoc -gofmt lib/sqlite*.go libtest/sqlite*.go

Notes

Input files are overwritten without asking. Be sure to have a backup of your files before using uncomment.

Package comments are not touched.

Bugs

The parser used by uncomment does not yet handle some generic constructs.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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