Moved BindingGenerator from gen html project. It makes more sense here.
This commit is contained in:
19
Sources/BindingGenerator/Internal/Url+Expect.swift
Normal file
19
Sources/BindingGenerator/Internal/Url+Expect.swift
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// Url+Expect.swift
|
||||
// HRW
|
||||
//
|
||||
// Created by Isaac Paul on 7/5/25.
|
||||
// Non-commercial license, see LICENSE.MD in the project root for details
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
extension URL {
|
||||
init(expect: String) throws {
|
||||
if let result2 = URL(string: expect) {
|
||||
self = result2
|
||||
return
|
||||
}
|
||||
throw AppError("Could not convert to url: \(expect)")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user