unused

command module
v0.0.0-...-dab01f4 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: MIT Imports: 20 Imported by: 0

README

The unused command reports unused constants, variables, types and functions in a go module.

Example:

$ unused -generated -exclude-glob '*.pb.go'

The tool can instructed to skip checking usage of objects by using line comments with a // unused:skip prefix on the same or previous line where the unused object is defined.

The // unused:disable comment disables the check after the comment in the current file.

Usage: unused [flags]

Installation

$ go install github.com/mgnsk/unused@latest

Documentation

Overview

The unused command reports unused constants, variables, types and functions in a go module.

Example:

`$ unused -generated -exclude-glob '*.pb.go'`

The tool can instructed to skip checking usage of objects by using line comments with a `// unused:skip` prefix on the same or previous line where the unused object is defined.

The `// unused:disable` comment disables the check after the comment in the current file.

Usage: `unused [flags]`

## Installation

`$ go install github.com/mgnsk/unused@latest`

Jump to

Keyboard shortcuts

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