Skip to content

mmpx12/gcat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

List or print functions, type, method in go files

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published