Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deferpanic/goweave
/ functions
Functions
114 in github.com/deferpanic/goweave
⨍
Functions
114
◇
Types & classes
8
↓ 42 callers
Method
writeOut
writeOut writes nlines to path
weave/file.go:69
↓ 15 callers
Method
writeAtLine
writeAtLine inserts writes to fname lntxt @ iline
weave/file.go:79
↓ 11 callers
Method
applyExecutionJP
applyExecutionJP applies any advice for execution joinpoints
weave/transform.go:299
↓ 10 callers
Method
applyCallAdvice
applyCallAdvice applies call advice before/after a call around advice is currently hacked in via applyAroundAdvice
weave/transform.go:68
↓ 9 callers
Function
NewWeave
NewWeave instantiates and returns a new aop
weave/weave.go:43
↓ 8 callers
Method
writeMissingImports
writeMissingImports writes body && any missing imports to fp
weave/imports.go:80
↓ 6 callers
Function
execShellCmd
(cmd string)
weave/build.go:32
↓ 6 callers
Method
parseAspectFile
parseAspectFile loads an individual file containing aspects there be tigers here subject to immediate and dramatic change
weave/aspect.go:136
↓ 6 callers
Function
printWLines
(stuff string)
weave/weave_test.go:1357
↓ 4 callers
Function
apply
apply replaces each AST field x in val with f(x), returning val. To avoid extra conversions, f operates on the reflect.Value form.
weave/replace.go:99
↓ 3 callers
Method
applyGetJP
applyGetJP applies any advice for get joinpoints
weave/get.go:11
↓ 3 callers
Method
applySetJP
applySetJP applies any advice for set joinpoints
weave/set.go:11
↓ 3 callers
Function
containArgs
containArgs ensures the function signature is 'correct' the following is left un-implemented and needs to be implemented FIXME 1) simple types - no pk
weave/ast.go:49
↓ 3 callers
Function
isIdent
stolen from http://golang.org/src/cmd/fix/fix.go
weave/ast.go:27
↓ 3 callers
Method
reWorkImports
reads file && de-dupes imports
weave/imports.go:17
↓ 3 callers
Method
rootPkg
rootPkg returns the root package of a go build this is needed to determine whether or not sub-pkg imports need to be re-written - which is basically a
weave/build.go:133
↓ 3 callers
Function
set
set is a wrapper for x.Set(y); it protects the caller from panics if x cannot be changed to y.
weave/replace.go:72
↓ 3 callers
Function
setBase
rootPkg returns the root package of a go build this is needed to determine whether or not sub-pkg imports need to be re-written - which is basically a
weave/build.go:140
↓ 2 callers
Method
ParseAST
Parse parses the ast for this file and returns a ParsedFile
weave/weave.go:133
↓ 2 callers
Method
addMissingImports
addMissingImports adds any imports from advice that was found
weave/imports.go:124
↓ 2 callers
Method
applyAroundAdvice
applyAroundAdvice uses code from gofmt to wrap any after advice essentially this is the same stuff you could do w/the cmdline tool, gofmt FIXME - mv
weave/transform.go:246
↓ 2 callers
Method
applyDeclarationJP
applyDeclarationJP applies any advice for set joinpoints currently expects a channel type need some extra help here to be agnostic maybe some helper f
weave/declaration.go:30
↓ 2 callers
Method
applyGlobalAdvice
applyGlobalAdvice applies any global scoped advice if advice has already been placed in this pkg than we skip no support for sub-pkgs yet FIXME
weave/transform.go:16
↓ 2 callers
Method
applyWithinJP
applyWithinJP applies any advice for within joinpoints right now this expects both 'before && after'
weave/within.go:12
↓ 2 callers
Method
binName
binName returns the expected bin name
weave/build.go:48
↓ 2 callers
Method
buildDir
buildDir determines what the root build dir is
weave/build.go:28
↓ 2 callers
Function
fileLines
returns a slice of lines from file path
weave/file.go:47
↓ 2 callers
Function
formatAdvice
formatAdvice subsitutes any reserved keywords currently supported is mName mName is the currently called method name
weave/within.go:152
↓ 2 callers
Function
isWildcard
(s string)
weave/replace.go:134
↓ 2 callers
Function
parseExpr
parseExpr returns an ast expression from the source s stolen from http://golang.org/src/cmd/fix/fix.go
weave/ast.go:34
↓ 2 callers
Method
processGoRoutines
processGoRoutines is in the process of being DEPRECATED it only provides regex support for go before/after advice once we refactor to AST replacing th
weave/go_routines.go:34
↓ 2 callers
Method
pruneImports
pruneImports returns a set of import strings de-duped from the ast
weave/imports.go:91
↓ 2 callers
Function
setDef
set def extracts the joinpoint from a pointcut definition
weave/pointcut.go:66
↓ 2 callers
Function
subst
subst returns a copy of pattern with values from m substituted in place of wildcards and pos used as the position of tokens from the pattern. if m ==
weave/replace.go:145
↓ 2 callers
Function
tmpLocation
()
weave/build.go:65
↓ 1 callers
Method
Run
Run preps, grabs advice, transforms the src, and builds the code
weave/weave.go:56
↓ 1 callers
Method
build
build does the actual compilation right nowe we piggy back off of 6g/8g
weave/build.go:75
↓ 1 callers
Function
buildDir
buildDir determines what the root build dir is
weave/build.go:42
↓ 1 callers
Method
containsAfter
containsAfter returns true if the body has after advice
weave/aspect.go:66
↓ 1 callers
Method
deDupeImports
deDupeImports de-dupes imports this is txt processing - not from the ast - FIXME
weave/imports.go:32
↓ 1 callers
Function
fileAsStr
fileAsStr reads path file and returns it as a string
weave/file.go:37
↓ 1 callers
Method
findAspects
findAspects finds all aspects for this project
weave/weave.go:217
↓ 1 callers
Method
findGoFiles
findGoFiles recursively finds all go files in a project
weave/weave.go:198
↓ 1 callers
Function
grabMethodName
HACK HACK HACK
weave/within.go:100
↓ 1 callers
Method
insertInWithin
insertInWithin places before/after advice around a statement
weave/within.go:117
↓ 1 callers
Function
inthere
inthere returns true if p is part of ray
weave/imports.go:113
↓ 1 callers
Method
isDeclaration
()
weave/pointcut.go:57
↓ 1 callers
Method
isGet
()
weave/pointcut.go:41
↓ 1 callers
Function
isPkgDot
stolen from http://golang.org/src/cmd/fix/fix.go
weave/ast.go:11
↓ 1 callers
Method
isSet
()
weave/pointcut.go:49
↓ 1 callers
Method
isWithin
()
weave/pointcut.go:33
↓ 1 callers
Method
iterateBodyStatements
iterateBodyStatements places within advice when a joinpoint is found
weave/within.go:88
↓ 1 callers
Method
loadAspects
grab_aspects looks for an aspect file for each file this seems lame and contrary to what we want... I'd go as far as to say that we want this to be cr
weave/aspect.go:22
↓ 1 callers
Function
match
match returns true if pattern matches val, recording wildcard submatches in m. If m == nil, match checks whether pattern == val.
weave/replace.go:206
↓ 1 callers
Function
multiLineGo
returns true if this is a multi-line go routine
weave/go_routines.go:11
↓ 1 callers
Method
parseAdvice
parseAdvice returns advice about this aspect
weave/aspect.go:80
↓ 1 callers
Method
parseImports
parseImports returns an array of imports for the corresponding advice
weave/aspect.go:44
↓ 1 callers
Method
parsePointCut
parsePointCut parses out a pointcut from an aspect
weave/pointcut.go:97
↓ 1 callers
Function
pointCutMatch
pointCutMatch returns an aspect if there is a pointcut match on this line or returns an empty aspect
weave/weave.go:163
↓ 1 callers
Method
prep
prep prepares any tmp. build dirs
weave/build.go:95
↓ 1 callers
Method
reWriteFile
reWriteFile rewrites curfile with out && adds any missing imports
weave/file.go:12
↓ 1 callers
Function
rewriteFile2
(pattern, replace ast.Expr, p *ast.File)
weave/replace.go:44
↓ 1 callers
Function
rewriteImport
rewriteImport is intended to rewrite a sub pkg of the base pkg to a relative path since we for now cp it to a diff. workspace
weave/imports.go:148
↓ 1 callers
Method
rightBraceCnt
rightBraceCnt returns the number of right braces in a string
weave/aspect.go:75
↓ 1 callers
Function
singleLineGo
returns true if this is a single line go routine
weave/go_routines.go:20
↓ 1 callers
Method
transform
transform reads line by line over each src file and inserts advice where appropriate only inserts before/advice after
weave/weave.go:180
↓ 1 callers
Method
whichGo
whichgo determines provides the full go path to the current go build tool
weave/build.go:56
Function
TestAfter
(t *testing.T)
weave/aspect_test.go:59
Function
TestApplyAroundAdvice
(t *testing.T)
weave/weave_test.go:11
Function
TestApplyCallAdvice
(t *testing.T)
weave/weave_test.go:725
Function
TestApplyCallAdvicePkgDot
(t *testing.T)
weave/weave_test.go:788
Function
TestApplyCallAsArg
(t *testing.T)
weave/weave_test.go:980
Function
TestApplyCallAsArgComma
(t *testing.T)
weave/weave_test.go:1037
Function
TestApplyCallAsArgComma2
(t *testing.T)
weave/weave_test.go:1093
Function
TestApplyDeclarationJP
(t *testing.T)
weave/declaration_test.go:8
Function
TestApplyExecutionJP
(t *testing.T)
weave/weave_test.go:158
Function
TestApplyExecutionJPAfter
(t *testing.T)
weave/weave_test.go:357
Function
TestApplyExecutionJPAfterwReturn
(t *testing.T)
weave/weave_test.go:416
Function
TestApplyExecutionJPAround
(t *testing.T)
weave/weave_test.go:477
Function
TestApplyExecutionJPBefore
(t *testing.T)
weave/weave_test.go:298
Function
TestApplyExecutionJPInnerFors
(t *testing.T)
weave/weave_test.go:538
Function
TestApplyExecutionJPMain
(t *testing.T)
weave/weave_test.go:247
Function
TestApplyExecutionJPRetBool
(t *testing.T)
weave/weave_test.go:658
Function
TestApplyExecutionJPRetStr
(t *testing.T)
weave/weave_test.go:599
Function
TestApplyGetJP
(t *testing.T)
weave/get_test.go:8
Function
TestApplyGlobalAdvice
(t *testing.T)
weave/weave_test.go:881
Function
TestApplySetJP
(t *testing.T)
weave/set_test.go:8
Function
TestApplySimpleGetJP
(t *testing.T)
weave/get_test.go:65
Function
TestApplySimpleSetJP
(t *testing.T)
weave/set_test.go:66
Function
TestApplyWithinJP
(t *testing.T)
weave/within_test.go:8
Function
TestAspectScope
(t *testing.T)
weave/aspect_test.go:201
Function
TestBefore
(t *testing.T)
weave/aspect_test.go:7
Function
TestCallBlah
(t *testing.T)
weave/weave_test.go:1215
Function
TestCallBlah2
(t *testing.T)
weave/weave_test.go:1285
Function
TestCallInCompositeLit
(t *testing.T)
weave/weave_test.go:1149
Function
TestContainArgs
(t *testing.T)
weave/weave_test.go:238
Function
TestGoTx
(t *testing.T)
weave/weave_test.go:63
Function
TestNoImports
(t *testing.T)
weave/aspect_test.go:154
Function
TestParseAspectFile
(t *testing.T)
weave/aspect_test.go:103
Function
TestPkgRewrite
(t *testing.T)
weave/weave_test.go:855
next →
1–100 of 114, ranked by callers