all: gofmt -s

This commit is contained in:
Bjørn Erik Pedersen 2017-08-07 20:03:15 +02:00
parent 40d7d3baa8
commit 4b54fb0701
4 changed files with 10 additions and 10 deletions

View file

@ -103,7 +103,7 @@ func doBenchMarkSiteBuilding(conf siteBuildingBenchmarkConfig, b *testing.B) {
// Try to help the GC // Try to help the GC
sites[0] = nil sites[0] = nil
sites = sites[1:len(sites)] sites = sites[1:]
} }
}) })
} }

View file

@ -89,7 +89,7 @@ func TestDecodeTypes(t *testing.T) {
{ {
"Redefine JSON", "Redefine JSON",
[]map[string]interface{}{ []map[string]interface{}{
map[string]interface{}{ {
"application/json": map[string]interface{}{ "application/json": map[string]interface{}{
"suffix": "jsn"}}}, "suffix": "jsn"}}},
false, false,
@ -102,7 +102,7 @@ func TestDecodeTypes(t *testing.T) {
{ {
"Add custom media type", "Add custom media type",
[]map[string]interface{}{ []map[string]interface{}{
map[string]interface{}{ {
"text/hugo": map[string]interface{}{ "text/hugo": map[string]interface{}{
"suffix": "hgo"}}}, "suffix": "hgo"}}},
false, false,
@ -119,7 +119,7 @@ func TestDecodeTypes(t *testing.T) {
{ {
"Add media type invalid key", "Add media type invalid key",
[]map[string]interface{}{ []map[string]interface{}{
map[string]interface{}{ {
"text/hugo+hgo": map[string]interface{}{}}}, "text/hugo+hgo": map[string]interface{}{}}},
true, true,
func(t *testing.T, name string, tt Types) { func(t *testing.T, name string, tt Types) {

View file

@ -145,7 +145,7 @@ func TestDecodeFormats(t *testing.T) {
{ {
"Redefine JSON", "Redefine JSON",
[]map[string]interface{}{ []map[string]interface{}{
map[string]interface{}{ {
"JsON": map[string]interface{}{ "JsON": map[string]interface{}{
"baseName": "myindex", "baseName": "myindex",
"isPlainText": "false"}}}, "isPlainText": "false"}}},
@ -161,7 +161,7 @@ func TestDecodeFormats(t *testing.T) {
{ {
"Add XML format with string as mediatype", "Add XML format with string as mediatype",
[]map[string]interface{}{ []map[string]interface{}{
map[string]interface{}{ {
"MYXMLFORMAT": map[string]interface{}{ "MYXMLFORMAT": map[string]interface{}{
"baseName": "myxml", "baseName": "myxml",
"mediaType": "application/xml", "mediaType": "application/xml",
@ -182,7 +182,7 @@ func TestDecodeFormats(t *testing.T) {
{ {
"Add format unknown mediatype", "Add format unknown mediatype",
[]map[string]interface{}{ []map[string]interface{}{
map[string]interface{}{ {
"MYINVALID": map[string]interface{}{ "MYINVALID": map[string]interface{}{
"baseName": "mymy", "baseName": "mymy",
"mediaType": "application/hugo", "mediaType": "application/hugo",
@ -194,12 +194,12 @@ func TestDecodeFormats(t *testing.T) {
{ {
"Add and redefine XML format", "Add and redefine XML format",
[]map[string]interface{}{ []map[string]interface{}{
map[string]interface{}{ {
"MYOTHERXMLFORMAT": map[string]interface{}{ "MYOTHERXMLFORMAT": map[string]interface{}{
"baseName": "myotherxml", "baseName": "myotherxml",
"mediaType": media.XMLType, "mediaType": media.XMLType,
}}, }},
map[string]interface{}{ {
"MYOTHERXMLFORMAT": map[string]interface{}{ "MYOTHERXMLFORMAT": map[string]interface{}{
"baseName": "myredefined", "baseName": "myredefined",
}}, }},

View file

@ -36,7 +36,7 @@ func TestIndex(t *testing.T) {
{[]int{0, 1}, []interface{}{0}, 0, false}, {[]int{0, 1}, []interface{}{0}, 0, false},
{[]int{0, 1}, []interface{}{9}, nil, false}, // index out of range {[]int{0, 1}, []interface{}{9}, nil, false}, // index out of range
{[]uint{0, 1}, nil, []uint{0, 1}, false}, {[]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{}{1}, 10, false},
{map[int]int{1: 10, 2: 20}, []interface{}{0}, 0, false}, {map[int]int{1: 10, 2: 20}, []interface{}{0}, 0, false},
// errors // errors