Skip to content

Commit

Permalink
MustacheTemplate.init?(filename:) internal
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Jun 27, 2024
1 parent 01ccf4a commit 63b0fe4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Mustache/Template+FileSystem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
import Foundation

extension MustacheTemplate {
/// Initialize template
/// Internal function to load a template from a file
/// - Parameters
/// - string: Template text
/// - filename: File template was loaded from
/// - Throws: MustacheTemplate.Error
public init?(filename: String) throws {
init?(filename: String) throws {
let fs = FileManager()
guard let data = fs.contents(atPath: filename) else { return nil }
let string = String(decoding: data, as: Unicode.UTF8.self)
Expand Down

0 comments on commit 63b0fe4

Please sign in to comment.