Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 1.13 KB

README.md

File metadata and controls

56 lines (40 loc) · 1.13 KB

GCAT:

img

List or print functions, type, method in go files

USAGE:

gcat [OPTION] FILE1 FILE2 ...

options:
-h, --help                     Show this help
-l, --list-functions           List all functions
-p, --print-function   FUNC    Cat FUNC function
-m, --method           TYPE    List TYPE method
-t, --list-types               List types
-d, --disable-syntax           Disable syntax highlighting
-v, --version                  Print version and exit

If no files are passed, check recursivly in current directory for .go files.

Note: For pointer receivers * should be escaped and quoted. It can also be ommited:

$ gcat -m '\*Receiver' main.go
func (r *Receiver) FuncName() string {}

$ gcat -m Receiver main.go
func (r *Receiver) FuncName() string {}

Examples:

$ gcat --list-functions
$ gcat --print-function main main.go

Install:

go install github.com/mmpx12/gcat@latest

or

git clone https://github.com/mmpx12/gcat.git
cd gcat
make
sudo make install

Prebuild binaries can be found here.