changeset 52:befb74a09424 draft

Code cleanup
author prologic
date Thu, 28 Oct 2021 16:10:15 +0000
parents e054275d0938
children be0a08e4a0f6
files .gitignore main.go main_test.go
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/.gitignore	Sat Oct 23 03:57:19 2021 +0000
+++ b/.gitignore	Thu Oct 28 16:10:15 2021 +0000
@@ -1,6 +1,7 @@
 *~
 *.bak
+**.pub
 
 /zs
-/.pub
 /dist
+/test.md
--- a/main.go	Sat Oct 23 03:57:19 2021 +0000
+++ b/main.go	Thu Oct 28 16:10:15 2021 +0000
@@ -33,9 +33,8 @@
 	}
 	if oldext == "" || strings.HasSuffix(path, oldext) {
 		return strings.TrimSuffix(path, oldext) + newext
-	} else {
-		return path
 	}
+	return path
 }
 
 // globals returns list of global OS environment variables that start
@@ -169,7 +168,7 @@
 			}
 		}
 	}
-	return s, nil
+	
 }
 
 // Renders markdown with the given layout into html expanding all the macros
--- a/main_test.go	Sat Oct 23 03:57:19 2021 +0000
+++ b/main_test.go	Thu Oct 28 16:10:15 2021 +0000
@@ -55,7 +55,7 @@
 title: Hello, world!
 ---
 Some content in markdown
-`: Vars{
+`: {
 			"foo":       "bar",
 			"title":     "Hello, world!",
 			"url":       "test.html",
@@ -67,7 +67,7 @@
 url: "example.com/foo.html"
 ---
 Hello
-`: Vars{
+`: {
 			"url":       "example.com/foo.html",
 			"__content": "Hello\n",
 		},