@@ -12,29 +12,39 @@ private import semmle.go.security.SafeUrlFlowCustomizations
12
12
* from the [Beego](https://github.com/beego/beego) package.
13
13
*/
14
14
module Beego {
15
- /**
16
- * Gets the module path `github.com/astaxie/beego` or `github.com/beego/beego`
17
- * or `github.com/beego/beego/v2`.
18
- */
19
- string modulePath ( ) {
20
- result =
21
- [
22
- "github.com/astaxie/beego" , "github.com/beego/beego" ,
23
- "github.com/beego/beego/v2"
24
- ]
25
- }
15
+ /** Gets the module path `github.com/astaxie/beego` or `github.com/beego/beego` */
16
+ string modulePath ( ) { result = [ "github.com/astaxie/beego" , "github.com/beego/beego" ] }
17
+
18
+ /** Gets the v2 module path `github.com/beego/beego/v2` */
19
+ string v2modulePath ( ) { result = "github.com/beego/beego/v2" }
26
20
27
21
/** Gets the path for the root package of beego. */
28
- string packagePath ( ) { result = package ( modulePath ( ) , [ "" , "server/web" ] ) }
22
+ string packagePath ( ) {
23
+ result = package ( modulePath ( ) , "" )
24
+ or
25
+ result = package ( v2modulePath ( ) , "server/web" )
26
+ }
29
27
30
28
/** Gets the path for the context package of beego. */
31
- string contextPackagePath ( ) { result = package ( modulePath ( ) , [ "context" , "server/web/context" ] ) }
29
+ string contextPackagePath ( ) {
30
+ result = package ( modulePath ( ) , "context" )
31
+ or
32
+ result = package ( v2modulePath ( ) , "server/web/context" )
33
+ }
32
34
33
35
/** Gets the path for the logs package of beego. */
34
- string logsPackagePath ( ) { result = package ( modulePath ( ) , [ "logs" , "core/logs" ] ) }
36
+ string logsPackagePath ( ) {
37
+ result = package ( modulePath ( ) , "logs" )
38
+ or
39
+ result = package ( v2modulePath ( ) , "core/logs" )
40
+ }
35
41
36
42
/** Gets the path for the utils package of beego. */
37
- string utilsPackagePath ( ) { result = package ( modulePath ( ) , [ "utils" , "core/utils" ] ) }
43
+ string utilsPackagePath ( ) {
44
+ result = package ( modulePath ( ) , "utils" )
45
+ or
46
+ result = package ( v2modulePath ( ) , "core/utils" )
47
+ }
38
48
39
49
/**
40
50
* `BeegoInput` sources of untrusted data.
0 commit comments