golocate

command
v0.0.0-...-43c8ab9 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

README

cloudeng.io/go/cmd/golocate

CircleCI Go Report Card

Usage of golocate

golocate is a utility for locating interface implementations, functions and comments in go source code using the parsed representation of the code rather than simple text search.

Locate all instances of io.Writer ./...

go run . --interfaces io.Writer ./...

Locate all exported functions in ./...

go run . --functions='.*' ./...

Locate all comments in ./...

go run . --comments='.*' ./...

The output of golocate is limited right now but is easily extended as uses cases arise. Currently locating interface implementations is the most useful.

Command line flags

-comments string
  	if set, find all comments that match this regular expression in the specified packages.
-functions string
  	if set, find all functions whose name matches this regular expression.
-interfaces string
  	if set, find all implementations of these interfaces in the speficied packages. The package local component of the interface name is treated as a regular expression

Documentation

Overview

Usage of golocate:

golocate is a utility for locating interface implementations, functions and comments in go source code using the parsed representation of the code rather than simple text search.

Locate all instances of io.Writer ./...

go run . --interfaces io.Writer ./...

Locate all exported functions in ./...

go run . --functions='.*' ./...

Locate all comments in ./...

go run . --comments='.*' ./...

The output of golocate is limited right now but is easily extended as uses cases arise. Currently locating interface implementations is the most useful.

Command line flags:

-comments string
  	if set, find all comments that match this regular expression in the specified packages.
-functions string
  	if set, find all functions whose name matches this regular expression.
-interfaces string
  	if set, find all implementations of these interfaces in the speficied packages. The package local component of the interface name is treated as a regular expression

Jump to

Keyboard shortcuts

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