Skip to content

Commit d4e8e4c

Browse files
committed
Add QLDoc for majorVersionSuffixRegex
1 parent 46d0c6f commit d4e8e4c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

go/ql/lib/semmle/go/Packages.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ class Package extends @package {
3333
string toString() { result = "package " + this.getPath() }
3434
}
3535

36+
/**
37+
* Gets a regex which matches major version suffixes.
38+
*
39+
* For example, this will match "/v2" followed by the end of a string or a "/"
40+
* (but it won't include the end of the strong or the "/" in the match).
41+
*/
3642
string majorVersionSuffixRegex() { result = "[./]v\\d+(?=$|/)" }
3743

3844
/**

0 commit comments

Comments
 (0)