Small fixes. (#2578)

Fix typos. Simplify with gofmt -s
This commit is contained in:
Alexey Palazhchenko 2017-04-05 16:24:22 +03:00 committed by Brian Brazil
parent 425f591fc9
commit 17f15d024a
4 changed files with 11 additions and 11 deletions

View File

@ -500,7 +500,7 @@ func (sl *scrapeLoop) append(samples model.Samples) (int, error) {
var wrappedBufApp storage.SampleAppender
wrappedBufApp, countingApp = sl.wrapAppender(bufApp)
for _, s := range samples {
// Ignore errors as bufferedAppender always succeds.
// Ignore errors as bufferedAppender always succeeds.
wrappedBufApp.Append(s)
}
samples = bufApp.buffer

View File

@ -143,7 +143,7 @@ func TestQueryRange(t *testing.T) {
},
},
remote: []model.Matrix{
model.Matrix{
{
&model.SampleStream{
Metric: model.Metric{
model.MetricNameLabel: "testmetric",
@ -164,7 +164,7 @@ func TestQueryRange(t *testing.T) {
},
},
},
model.Matrix{
{
&model.SampleStream{
Metric: model.Metric{
model.MetricNameLabel: "testmetric",
@ -231,7 +231,7 @@ func TestQueryRange(t *testing.T) {
},
},
remote: []model.Matrix{
model.Matrix{
{
&model.SampleStream{
Metric: model.Metric{
model.MetricNameLabel: "testmetric",
@ -252,7 +252,7 @@ func TestQueryRange(t *testing.T) {
},
},
},
model.Matrix{
{
&model.SampleStream{
Metric: model.Metric{
model.MetricNameLabel: "testmetric",
@ -323,7 +323,7 @@ func TestQueryRange(t *testing.T) {
{
name: "no local data",
remote: []model.Matrix{
model.Matrix{
{
&model.SampleStream{
Metric: model.Metric{
model.MetricNameLabel: "testmetric",
@ -345,7 +345,7 @@ func TestQueryRange(t *testing.T) {
},
},
},
model.Matrix{
{
&model.SampleStream{
Metric: model.Metric{
model.MetricNameLabel: "testmetric",
@ -507,7 +507,7 @@ func TestQueryRange(t *testing.T) {
},
},
remote: []model.Matrix{
model.Matrix{
{
&model.SampleStream{
Metric: model.Metric{
model.MetricNameLabel: "testmetric",

View File

@ -1209,7 +1209,7 @@ func (s *MemorySeriesStorage) maybeEvict() {
// to 1 to signal that we want to evict chunk but have no evictable chunks
// available.
//
// - Otherwise, calulate the number of chunks to evict and return it:
// - Otherwise, calculate the number of chunks to evict and return it:
//
// MAX( h(nextGC), h(current) ) - h(target)
// n(toEvict) = MIN( n(evictable), ---------------------------------------- )

View File

@ -453,7 +453,7 @@ func TestEndpoints(t *testing.T) {
endpoint: api.targets,
response: &TargetDiscovery{
ActiveTargets: []*Target{
&Target{
{
DiscoveredLabels: model.LabelSet{},
Labels: model.LabelSet{},
ScrapeURL: "http://example.com:8080/metrics",
@ -465,7 +465,7 @@ func TestEndpoints(t *testing.T) {
endpoint: api.alertmanagers,
response: &AlertmanagerDiscovery{
ActiveAlertmanagers: []*AlertmanagerTarget{
&AlertmanagerTarget{
{
URL: "http://alertmanager.example.com:8080/api/v1/alerts",
},
},