Commits

Cédric Bonhomme  committed 95c8c13

Test if the year is defined.

  • Participants
  • Parent commits a0de688

Comments (0)

Files changed (1)

     os.Stdout.WriteString("<link rel=\"stylesheet\" type=\"text/css\" href=\"./style.css\" />\n</head>\n")
     os.Stdout.WriteString("<body>\n")
     os.Stdout.WriteString("<blockquote>\"" + quote.Citation + "\"</blockquote>\n")
-    os.Stdout.WriteString(quote.Author + " - " + quote.Year + "\n")
+    os.Stdout.WriteString(quote.Author)
+    if len(quote.Year) !=0 {
+        os.Stdout.WriteString(" - " + quote.Year + "\n")
+    }
+    else {
+        os.Stdout.WriteString("\n")
+    }
     os.Stdout.WriteString("</body>\n</html>")
 }