Fix various issues with formatting and typos (#424)

* Fix typos

* Simplify code

* Fix error usage
This commit is contained in:
Michael Grosser
2016-11-13 14:03:12 +00:00
committed by Miek Gieben
parent f402b8f726
commit ece3cf8ecf
13 changed files with 19 additions and 19 deletions

View File

@@ -286,7 +286,7 @@ func (k *Kubernetes) getServiceRecordForIP(ip, name string) []msg.Service {
}
for _, service := range svcList {
if service.Spec.ClusterIP == ip {
return []msg.Service{msg.Service{Host: ip}}
return []msg.Service{{Host: ip}}
}
}

View File

@@ -14,9 +14,9 @@ const (
// Map of format string :: expected locations of name symbols in the format.
// -1 value indicates that symbol does not exist in format.
var exampleTemplates = map[string][]int{
"{service}.{namespace}.{type}.{zone}": []int{3, 1, 0}, // service symbol expected @ position 0, namespace @ 1, zone @ 3
"{namespace}.{type}.{zone}": []int{2, 0, -1},
"": []int{-1, -1, -1},
"{service}.{namespace}.{type}.{zone}": {3, 1, 0}, // service symbol expected @ position 0, namespace @ 1, zone @ 3
"{namespace}.{type}.{zone}": {2, 0, -1},
"": {-1, -1, -1},
}
func TestSetTemplate(t *testing.T) {