Skip to content

Commit 3c0e29c

Browse files
committed
refactor: refactor method for clean up not use
1 parent dc3c610 commit 3c0e29c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Sources/FSAppConfiguration/FSAppConfiguration.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public struct FSAppConfiguration {
127127
return ""
128128
} else {
129129
self.app.logger.info("SUCCESS: Encoded '\(versionString)' by '\(path)' from consul")
130-
return versionString
130+
return versionString.replacingOccurrences(of: "\n", with: "")
131131
}
132132
}
133133
}
@@ -176,7 +176,7 @@ public struct FSAppConfiguration {
176176
fatalError("ERROR: Failed to encoding Version value from - '\(versionValue)'")
177177
}
178178
self.app.logger.info("SUCCESS: Get the Version - \(versionString) from the local machine along the file path \(versionPath)")
179-
return versionString
179+
return versionString.replacingOccurrences(of: "\n", with: "")
180180
}
181181

182182
/// Decode Consul `ClientResponse`

Sources/FSAppConfiguration/FSAppConfigurationAsync.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public struct FSAppConfigurationAsync {
104104
return ""
105105
} else {
106106
self.app.logger.info("SUCCESS: Encoded '\(versionString)' by '\(path)' from consul")
107-
return versionString
107+
return versionString.replacingOccurrences(of: "\n", with: "")
108108
}
109109
}.get()
110110
}
@@ -176,7 +176,7 @@ public struct FSAppConfigurationAsync {
176176
fatalError("ERROR: Failed to encoding Version value from - '\(versionValue)'")
177177
}
178178
self.app.logger.info("SUCCESS: Get the Version - \(versionString) from the local machine along the file path \(versionPath)")
179-
return versionString
179+
return versionString.replacingOccurrences(of: "\n", with: "")
180180
}
181181

182182
/// Decode Consul `ClientResponse`

0 commit comments

Comments
 (0)