This commit is contained in:
cokeBeer 2022-05-13 21:24:58 +08:00
Родитель 75f2edd220
Коммит aa2d4450ad
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -12,36 +12,36 @@ private import semmle.go.security.SafeUrlFlowCustomizations
* from the [Beego](https://github.com/beego/beego) package. * from the [Beego](https://github.com/beego/beego) package.
*/ */
module Beego { module Beego {
/** Gets the module path `github.com/astaxie/beego` or `github.com/beego/beego`. */ /** Gets the v1 module path `github.com/astaxie/beego` or `github.com/beego/beego`. */
string modulePath() { result = ["github.com/astaxie/beego", "github.com/beego/beego"] } string v1modulePath() { result = ["github.com/astaxie/beego", "github.com/beego/beego"] }
/** Gets the v2 module path `github.com/beego/beego/v2` */ /** Gets the v2 module path `github.com/beego/beego/v2` */
string v2modulePath() { result = "github.com/beego/beego/v2" } string v2modulePath() { result = "github.com/beego/beego/v2" }
/** Gets the path for the root package of beego. */ /** Gets the path for the root package of beego. */
string packagePath() { string packagePath() {
result = package(modulePath(), "") result = package(v1modulePath(), "")
or or
result = package(v2modulePath(), "server/web") result = package(v2modulePath(), "server/web")
} }
/** Gets the path for the context package of beego. */ /** Gets the path for the context package of beego. */
string contextPackagePath() { string contextPackagePath() {
result = package(modulePath(), "context") result = package(v1modulePath(), "context")
or or
result = package(v2modulePath(), "server/web/context") result = package(v2modulePath(), "server/web/context")
} }
/** Gets the path for the logs package of beego. */ /** Gets the path for the logs package of beego. */
string logsPackagePath() { string logsPackagePath() {
result = package(modulePath(), "logs") result = package(v1modulePath(), "logs")
or or
result = package(v2modulePath(), "core/logs") result = package(v2modulePath(), "core/logs")
} }
/** Gets the path for the utils package of beego. */ /** Gets the path for the utils package of beego. */
string utilsPackagePath() { string utilsPackagePath() {
result = package(modulePath(), "utils") result = package(v1modulePath(), "utils")
or or
result = package(v2modulePath(), "core/utils") result = package(v2modulePath(), "core/utils")
} }