Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use String interpolation instead of String.format #917

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions library/src/main/scala/g8.scala
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ object G8 {
}
} catch {
case e: Exception =>
println("Falling back to file copy for %s: %s" format (in.toString, e.getMessage))
println(s"Falling back to file copy for ${in}: ${e.getMessage}")
FileUtils.copyFile(in, out)
}
allCatch opt {
Expand Down Expand Up @@ -505,10 +505,10 @@ object G8 {
}
.foreach { case (in, optionOut) =>
optionOut match {
case None => println("Skipping ignored file: %s" format in.toString)
case None => println(s"Skipping ignored file: ${in}")
case Some(out) => {
if (out.exists && !forceOverwrite) {
println("Skipping existing file: %s" format out.toString)
println(s"Skipping existing file: ${out}")
} else {
out.getParentFile.mkdirs()
if (G8.verbatim(in, parameters, tmpl))
Expand All @@ -535,7 +535,7 @@ object G8 {
}
}

Right("Template applied in %s" format (base.toString))
Right(s"Template applied in ${base}")
}

def copyScaffolds(sf: File, output: File): Unit = {
Expand Down