func ScanFuncDeclByComment(fileName, src, targetComment string) *AnalysisResult {
	fSet := token.NewFileSet()
	f, err := parser.ParseFile(fSet, fileName, src, parser.ParseComments)
	if err != nil {
		panic(err)
	}

	result := &AnalysisResult{
		RecvMethods: make(map[string][]MethodInfo),
	}
	result.PkgName = f.Name.String()
	for _, d := range f.Decls {
		switch decl := d.(type) {
		case *ast.FuncDecl:
			if decl.Doc != nil {
				if isContainComment(decl.Doc.List, targetComment) {
					// bingo
					analysisComment(f.Name.String(), decl, result, targetComment)
				}
			}
		}
	}
	return result
}
// find func and method in go file by target comment
// @see github.com\astaxie\beego\parser.go parserPkg
// @see github.com\astaxie\beego\parser.go parserComments
find func and method in go file by target comment
@see github.com\astaxie\beego\parser.go parserPkg
@see github.com\astaxie\beego\parser.go parserComments
// find func and method in go file by target comment // @see github . com \ astaxie \ beego \ parser . go parserPkg // @see github . com \ astaxie \ beego \ parser . go parserComments
func ScanFuncDeclByComment(fileName, src, targetComment string) *AnalysisResult {
	fSet := token.NewFileSet()
	f, err := parser.ParseFile(fSet, fileName, src, parser.ParseComments)
	if err != nil {
		panic(err)
	}
	result := &AnalysisResult{
		RecvMethods: make(map[string][]MethodInfo),
	}
	result.PkgName = f.Name.String()
	for _, d := range f.Decls {
		switch decl := d.(type) {
		case *ast.FuncDecl:
			if decl.Doc != nil {
				if isContainComment(decl.Doc.List, targetComment) {
					analysisComment(f.Name.String(), decl, result, targetComment)
				}
			}
		}
	}
	return result
}
func ScanFuncDeclByComment ( fileName , src , targetComment string ) * AnalysisResult { fSet := token . NewFileSet ( ) f , err := parser . ParseFile ( fSet , fileName , src , parser . ParseComments ) if err != nil { panic ( err ) } result := & AnalysisResult { RecvMethods : make ( map [ string ] [ ] MethodInfo ) , } result . PkgName = f . Name . String ( ) for _ , d := range f . Decls { switch decl := d . ( type ) { case * ast . FuncDecl : if decl . Doc != nil { if isContainComment ( decl . Doc . List , targetComment ) { analysisComment ( f . Name . String ( ) , decl , result , targetComment ) } } } } return result }
find func and method in go file by target comment
@see github.com\astaxie\beego\parser.go parserPkg
@see github.com\astaxie\beego\parser.go parserComments
find func and method in go file by target comment @see github . com \ astaxie \ beego \ parser . go parserPkg @see github . com \ astaxie \ beego \ parser . go parserComments
// bingo