hugolib: Use field keys in composite literals
authorCameron Moore <moorereason@gmail.com>
Mon, 21 Mar 2016 14:36:19 +0000 (09:36 -0500)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 22 Mar 2016 18:43:28 +0000 (19:43 +0100)
Small fix in shortcode tests to use field keys in a composite literal.

hugolib/shortcode_test.go

index 5d276301697f6b86b543f2b306031472fedcc524..3c13fa298b1baf14b18c5e3260f2c65a7c3c34fc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2015 The Hugo Authors. All rights reserved.
+// Copyright 2016 The Hugo Authors. All rights reserved.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -15,9 +15,6 @@ package hugolib
 
 import (
        "fmt"
-       "github.com/spf13/hugo/hugofs"
-       "github.com/spf13/hugo/source"
-       "github.com/spf13/hugo/target"
        "path/filepath"
        "reflect"
        "regexp"
@@ -26,6 +23,9 @@ import (
        "testing"
 
        "github.com/spf13/hugo/helpers"
+       "github.com/spf13/hugo/hugofs"
+       "github.com/spf13/hugo/source"
+       "github.com/spf13/hugo/target"
        "github.com/spf13/hugo/tpl"
        "github.com/spf13/viper"
 )
@@ -464,7 +464,7 @@ e`,
        sources := make([]source.ByteSource, len(tests))
 
        for i, test := range tests {
-               sources[i] = source.ByteSource{filepath.FromSlash(test.contentPath), []byte(test.content)}
+               sources[i] = source.ByteSource{Name: filepath.FromSlash(test.contentPath), Content: []byte(test.content)}
        }
 
        s := &Site{