diff options
author | Cameron Moore <moorereason@gmail.com> | 2016-08-19 06:22:19 -0500 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-08-19 12:22:19 +0100 |
commit | 715d4425ade4d74cd479b2c87b0510bb6ebd0b42 (patch) | |
tree | deaf9d96b085d80e39052b0f5ac3492ea23545cc /hugolib/handler_test.go | |
parent | c5d072990ab79cee601fe7266c9d416a9a099901 (diff) |
hugolib: Use named keys in composite literals
Make `go vet` great again
Diffstat (limited to 'hugolib/handler_test.go')
-rw-r--r-- | hugolib/handler_test.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/hugolib/handler_test.go b/hugolib/handler_test.go index ee5913634..1b0a82418 100644 --- a/hugolib/handler_test.go +++ b/hugolib/handler_test.go @@ -30,15 +30,15 @@ func TestDefaultHandler(t *testing.T) { hugofs.InitMemFs() sources := []source.ByteSource{ - {filepath.FromSlash("sect/doc1.html"), []byte("---\nmarkup: markdown\n---\n# title\nsome *content*")}, - {filepath.FromSlash("sect/doc2.html"), []byte("<!doctype html><html><body>more content</body></html>")}, - {filepath.FromSlash("sect/doc3.md"), []byte("# doc3\n*some* content")}, - {filepath.FromSlash("sect/doc4.md"), []byte("---\ntitle: doc4\n---\n# doc4\n*some content*")}, - {filepath.FromSlash("sect/doc3/img1.png"), []byte("‰PNG ��� IHDR����������:~›U��� IDATWcø��ZMoñ����IEND®B`‚")}, - {filepath.FromSlash("sect/img2.gif"), []byte("GIF89a��€��ÿÿÿ���,�������D�;")}, - {filepath.FromSlash("sect/img2.spf"), []byte("****FAKE-FILETYPE****")}, - {filepath.FromSlash("doc7.html"), []byte("<html><body>doc7 content</body></html>")}, - {filepath.FromSlash("sect/doc8.html"), []byte("---\nmarkup: md\n---\n# title\nsome *content*")}, + {Name: filepath.FromSlash("sect/doc1.html"), Content: []byte("---\nmarkup: markdown\n---\n# title\nsome *content*")}, + {Name: filepath.FromSlash("sect/doc2.html"), Content: []byte("<!doctype html><html><body>more content</body></html>")}, + {Name: filepath.FromSlash("sect/doc3.md"), Content: []byte("# doc3\n*some* content")}, + {Name: filepath.FromSlash("sect/doc4.md"), Content: []byte("---\ntitle: doc4\n---\n# doc4\n*some content*")}, + {Name: filepath.FromSlash("sect/doc3/img1.png"), Content: []byte("‰PNG ��� IHDR����������:~›U��� IDATWcø��ZMoñ����IEND®B`‚")}, + {Name: filepath.FromSlash("sect/img2.gif"), Content: []byte("GIF89a��€��ÿÿÿ���,�������D�;")}, + {Name: filepath.FromSlash("sect/img2.spf"), Content: []byte("****FAKE-FILETYPE****")}, + {Name: filepath.FromSlash("doc7.html"), Content: []byte("<html><body>doc7 content</body></html>")}, + {Name: filepath.FromSlash("sect/doc8.html"), Content: []byte("---\nmarkup: md\n---\n# title\nsome *content*")}, } viper.Set("DefaultExtension", "html") |