func parseFuncDecl(bci *BenchClientInfo, decl *ast.FuncDecl) {
	if !strings.HasPrefix(decl.Name.String(), "New") {
		return
	}

	funcName := decl.Name.String()
	for _, r := range decl.Type.Results.List {
		retName := types.ExprString(r.Type)
		if s, ok := bci.Services[retName]; ok {
			// s has already been added in parseGenDecl()
			s.Factory = funcName
		}
	}
}
// parseFuncDecl searches factory functions of Client API Interface from decl,
// and add it to BenchClientInfo.
parseFuncDecl searches factory functions of Client API Interface from decl,
and add it to BenchClientInfo.
// parseFuncDecl searches factory functions of Client API Interface from decl // and add it to BenchClientInfo .
func parseFuncDecl(bci *BenchClientInfo, decl *ast.FuncDecl) {
	if !strings.HasPrefix(decl.Name.String(), "New") {
		return
	}
	funcName := decl.Name.String()
	for _, r := range decl.Type.Results.List {
		retName := types.ExprString(r.Type)
		if s, ok := bci.Services[retName]; ok {
			s.Factory = funcName
		}
	}
}
func parseFuncDecl ( bci * BenchClientInfo , decl * ast . FuncDecl ) { if ! strings . HasPrefix ( decl . Name . String ( ) , " " ) { return } funcName := decl . Name . String ( ) for _ , r := range decl . Type . Results . List { retName := types . ExprString ( r . Type ) if s , ok := bci . Services [ retName ] ; ok { s . Factory = funcName } } }
parseFuncDecl searches factory functions of Client API Interface from decl,
and add it to BenchClientInfo.
parseFuncDecl searches factory functions of Client API Interface from decl and add it to BenchClientInfo .
// s has already been added in parseGenDecl()