Added namespaces to some of the constants for the String+Constants extension in the library target.

This commit is contained in:
2025-09-24 18:19:50 +02:00
parent a274547977
commit 9320227c64
5 changed files with 21 additions and 18 deletions
@@ -23,8 +23,8 @@ struct CheckURIUseCase {
func callAsFunction(_ uri: URI) -> String? {
guard
let uriPath = uri.path.removingPercentEncoding,
!uriPath.contains(.previousFolder),
uriPath.hasPrefix(.forwardSlash)
!uriPath.contains(.Path.previousFolder),
uriPath.hasPrefix(.Path.forwardSlash)
else {
return nil
}
@@ -56,7 +56,7 @@ struct PrepareURIPathUseCase {
}
let documentationName = uriRest
.split(separator: .forwardSlash)
.split(separator: .Path.forwardSlash)
.map(String.init)
.first
@@ -110,9 +110,9 @@ private extension PrepareURIPathUseCase {
return nil
}
guard let uriRest = matches.output.1 else {
return .forwardSlash
return .Path.forwardSlash
}
guard uriRest.hasPrefix(String.forwardSlash) else {
guard uriRest.hasPrefix(.Path.forwardSlash) else {
return .init(format: .Format.Path.root, uriRest)
}
return uriRest
@@ -50,7 +50,7 @@ struct RedirectURIUseCase {
statusCode: .movedPermanently,
redirect: uriPath
),
source: .source
source: .Logging.source
)
}
@@ -61,10 +61,3 @@ struct RedirectURIUseCase {
}
}
// MARK: - String+Constants
private extension String {
/// A name of the middleware that triggered a logging event.
static let source = "DocCMiddleware"
}