Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-08-07 21:03:15 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-08-07 21:03:15 +0300
commit4b54fb07018d5ed66ef82b6a53462e1b15c85d86 (patch)
tree4a91d6cb9f967c18a7c4dad51aeb1a182d7849ce
parent40d7d3baa8d83ad71873c85cf08286e1aaea6174 (diff)
all: gofmt -s
-rw-r--r--hugolib/site_benchmark_test.go2
-rw-r--r--media/mediaType_test.go6
-rw-r--r--output/outputFormat_test.go10
-rw-r--r--tpl/collections/index_test.go2
4 files changed, 10 insertions, 10 deletions
diff --git a/hugolib/site_benchmark_test.go b/hugolib/site_benchmark_test.go
index d23271af7..123e69b30 100644
--- a/hugolib/site_benchmark_test.go
+++ b/hugolib/site_benchmark_test.go
@@ -103,7 +103,7 @@ func doBenchMarkSiteBuilding(conf siteBuildingBenchmarkConfig, b *testing.B) {
// Try to help the GC
sites[0] = nil
- sites = sites[1:len(sites)]
+ sites = sites[1:]
}
})
}
diff --git a/media/mediaType_test.go b/media/mediaType_test.go
index a6b18d1d6..ffef07b80 100644
--- a/media/mediaType_test.go
+++ b/media/mediaType_test.go
@@ -89,7 +89,7 @@ func TestDecodeTypes(t *testing.T) {
{
"Redefine JSON",
[]map[string]interface{}{
- map[string]interface{}{
+ {
"application/json": map[string]interface{}{
"suffix": "jsn"}}},
false,
@@ -102,7 +102,7 @@ func TestDecodeTypes(t *testing.T) {
{
"Add custom media type",
[]map[string]interface{}{
- map[string]interface{}{
+ {
"text/hugo": map[string]interface{}{
"suffix": "hgo"}}},
false,
@@ -119,7 +119,7 @@ func TestDecodeTypes(t *testing.T) {
{
"Add media type invalid key",
[]map[string]interface{}{
- map[string]interface{}{
+ {
"text/hugo+hgo": map[string]interface{}{}}},
true,
func(t *testing.T, name string, tt Types) {
diff --git a/output/outputFormat_test.go b/output/outputFormat_test.go
index 18b84a0fa..9033de869 100644
--- a/output/outputFormat_test.go
+++ b/output/outputFormat_test.go
@@ -145,7 +145,7 @@ func TestDecodeFormats(t *testing.T) {
{
"Redefine JSON",
[]map[string]interface{}{
- map[string]interface{}{
+ {
"JsON": map[string]interface{}{
"baseName": "myindex",
"isPlainText": "false"}}},
@@ -161,7 +161,7 @@ func TestDecodeFormats(t *testing.T) {
{
"Add XML format with string as mediatype",
[]map[string]interface{}{
- map[string]interface{}{
+ {
"MYXMLFORMAT": map[string]interface{}{
"baseName": "myxml",
"mediaType": "application/xml",
@@ -182,7 +182,7 @@ func TestDecodeFormats(t *testing.T) {
{
"Add format unknown mediatype",
[]map[string]interface{}{
- map[string]interface{}{
+ {
"MYINVALID": map[string]interface{}{
"baseName": "mymy",
"mediaType": "application/hugo",
@@ -194,12 +194,12 @@ func TestDecodeFormats(t *testing.T) {
{
"Add and redefine XML format",
[]map[string]interface{}{
- map[string]interface{}{
+ {
"MYOTHERXMLFORMAT": map[string]interface{}{
"baseName": "myotherxml",
"mediaType": media.XMLType,
}},
- map[string]interface{}{
+ {
"MYOTHERXMLFORMAT": map[string]interface{}{
"baseName": "myredefined",
}},
diff --git a/tpl/collections/index_test.go b/tpl/collections/index_test.go
index b9261735f..bd752d666 100644
--- a/tpl/collections/index_test.go
+++ b/tpl/collections/index_test.go
@@ -36,7 +36,7 @@ func TestIndex(t *testing.T) {
{[]int{0, 1}, []interface{}{0}, 0, false},
{[]int{0, 1}, []interface{}{9}, nil, false}, // index out of range
{[]uint{0, 1}, nil, []uint{0, 1}, false},
- {[][]int{[]int{1, 2}, []int{3, 4}}, []interface{}{0, 0}, 1, false},
+ {[][]int{{1, 2}, {3, 4}}, []interface{}{0, 0}, 1, false},
{map[int]int{1: 10, 2: 20}, []interface{}{1}, 10, false},
{map[int]int{1: 10, 2: 20}, []interface{}{0}, 0, false},
// errors