hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 689cda17403ba752305f469fdcc385b7a31b0bdb
parent 19cb6c7819baa0daa7c6d6f0c23481578171ead8
Author: Noah Campbell <noahcampbell@gmail.com>
Date:   Tue,  1 Oct 2013 19:59:35 -0700

Code cleanup

Diffstat:
Mtarget/memory.go | 3+--
Mtransform/chain.go | 4++--
Mtransform/chain_test.go | 2+-
Mtransform/posttrans_test.go | 12++++++------
4 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/target/memory.go b/target/memory.go
@@ -1,8 +1,8 @@
 package target
 
 import (
-	"io"
 	"bytes"
+	"io"
 )
 
 type InMemoryTarget struct {
@@ -22,4 +22,3 @@ func (t *InMemoryTarget) Publish(label string, reader io.Reader) (err error) {
 func (t *InMemoryTarget) Translate(label string) (dest string, err error) {
 	return label, nil
 }
-
diff --git a/transform/chain.go b/transform/chain.go
@@ -1,8 +1,8 @@
 package transform
 
 import (
-	"io"
 	"bytes"
+	"io"
 )
 
 type chain struct {
@@ -23,7 +23,7 @@ func (c *chain) Apply(w io.Writer, r io.Reader) (err error) {
 		}
 		in = bytes.NewBuffer(out.Bytes())
 	}
-	
+
 	_, err = io.Copy(w, in)
 	return
 }
diff --git a/transform/chain_test.go b/transform/chain_test.go
@@ -23,7 +23,7 @@ const H5_JS_CONTENT_ABS_URL_WITH_NAV = "<!DOCTYPE html><html><head><script src=\
 
 const CORRECT_OUTPUT_SRC_HREF_WITH_NAV = "<!DOCTYPE html><html><head><script src=\"http://two/foobar.js\"></script></head><body><nav><ul><li hugo-nav=\"section_0\"></li><li hugo-nav=\"section_1\" class=\"active\"></li></ul></nav><article>content <a href=\"http://two/foobar\">foobar</a>. Follow up</article></body></html>"
 
-var two_chain_tests = []test {
+var two_chain_tests = []test{
 	{H5_JS_CONTENT_ABS_URL_WITH_NAV, CORRECT_OUTPUT_SRC_HREF_WITH_NAV},
 }
 
diff --git a/transform/posttrans_test.go b/transform/posttrans_test.go
@@ -25,15 +25,15 @@ func TestAbsUrlify(t *testing.T) {
 }
 
 type test struct {
-	content string
+	content  string
 	expected string
 }
 
-var abs_url_tests = []test {
-		{H5_JS_CONTENT_DOUBLE_QUOTE, CORRECT_OUTPUT_SRC_HREF},
-		{H5_JS_CONTENT_SINGLE_QUOTE, CORRECT_OUTPUT_SRC_HREF},
-		{H5_JS_CONTENT_ABS_URL, H5_JS_CONTENT_ABS_URL},
-	}
+var abs_url_tests = []test{
+	{H5_JS_CONTENT_DOUBLE_QUOTE, CORRECT_OUTPUT_SRC_HREF},
+	{H5_JS_CONTENT_SINGLE_QUOTE, CORRECT_OUTPUT_SRC_HREF},
+	{H5_JS_CONTENT_ABS_URL, H5_JS_CONTENT_ABS_URL},
+}
 
 func apply(t *testing.T, tr Transformer, tests []test) {
 	for _, test := range tests {