based on the JBP_CONFIG_TOMCAT field from manifest. It looks for a tomcat block with a version of the form " .+" (e.g. "9.+", "10.+", "10.1.+"). Returns the pattern with "+" replaced by "*" (e.g. "9.*", "10.*", "10.1.*") so libbuildpack can resolve it. Masterminds/semver treats x, X, and * as
(version string)
| 475 | // Returns the pattern with "+" replaced by "*" (e.g. "9.*", "10.*", "10.1.*") so libbuildpack can resolve it. |
| 476 | // Masterminds/semver treats x, X, and * as equivalent wildcards. |
| 477 | func DetermineTomcatVersion(version string) string { |
| 478 | // Replace "+" with "*" so libbuildpack's FindMatchingVersion can resolve it. |
| 479 | // e.g. "9.+" -> "9.*", "10.+" -> "10.*", "10.1.+" -> "10.1.*" |
| 480 | return strings.ReplaceAll(version, "+", "*") |
| 481 | } |
| 482 | |
| 483 | // isAccessLoggingEnabled checks if access logging is enabled in configuration |
| 484 | // Returns: "true" or "false" as a string (for use in JAVA_OPTS) |
no outgoing calls
no test coverage detected