From a1b99885267c1db5eb1459b592e8631cbff7a98a Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Tue, 8 Oct 2024 15:25:02 +0900 Subject: [PATCH] use String interpolation instead of String.format --- library/src/main/scala/g8.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/src/main/scala/g8.scala b/library/src/main/scala/g8.scala index 763b7115..7cc95e4a 100644 --- a/library/src/main/scala/g8.scala +++ b/library/src/main/scala/g8.scala @@ -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 { @@ -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)) @@ -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 = {