# README
Introduction
Let you do anything by manipulating the go code.
We provide source file parsing, rewriting and building utilities in this repository. A classical usage is to implement function trace by adding a log in begining of each function's body.
A more sophisticated usage is https://github.com/xhd2015/go-mock.
Usage
CLI
# add dependency
go get github.com/xhd2015/go-inspect
How it works?
The whole process can be splitted into the following phases:
ParseOptions
LoadPackages
FindMainModule
FindStarterPackages
FindExtraPackages
TraversePackages
TraverseFiles
TraverseFunctions
TraverseNodes
SyncContent
Build
Rewrite
How we refactor rewrite?
-
reduce context we wrap all contextual information with proper struct
-
provide Visitor-like pattern
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author