Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/docker-integration-tests/query_fanout/restrict.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ type values []value
type value []interface{}

func (r *result) genID() result {
tags := make(sort.StringSlice, len(r.Metric))
tags := make(sort.StringSlice, 0, len(r.Metric))
for k, v := range r.Metric {
tags = append(tags, fmt.Sprintf("%s:%s,", k, v))
}
Expand Down
2 changes: 1 addition & 1 deletion src/aggregator/client/writer_mgr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func TestWriterManagerRemoveInstancesSuccess(t *testing.T) {
nonexistent := placement.NewInstance().
SetID("nonexistent").
SetEndpoint("nonexistentAddress")
toRemove := append([]placement.Instance{nonexistent, testPlacementInstance})
toRemove := []placement.Instance{nonexistent, testPlacementInstance}
require.NoError(t, mgr.RemoveInstances(toRemove))
require.Equal(t, 0, len(mgr.writers))
require.True(t, clock.WaitUntil(func() bool {
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/services/m3comparator/main/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (v *Value) UnmarshalJSON(data []byte) error {
// IDOrGenID gets the ID for this result.
func (r *Series) IDOrGenID() string {
if len(r.id) == 0 {
tags := make(sort.StringSlice, len(r.Tags))
tags := make(sort.StringSlice, 0, len(r.Tags))
for _, v := range r.Tags {
tags = append(tags, fmt.Sprintf("%s:%s,", v[0], v[1]))
}
Expand Down
2 changes: 1 addition & 1 deletion src/dbnode/integration/integration_data_verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func writeVerifyDebugOutput(

list := make(readableSeriesList, 0, len(series))
for i := range series {
tags := make([]readableSeriesTag, len(series[i].Tags.Values()))
tags := make([]readableSeriesTag, 0, len(series[i].Tags.Values()))
for _, tag := range series[i].Tags.Values() {
tags = append(tags, readableSeriesTag{
Name: tag.Name.String(),
Expand Down
2 changes: 1 addition & 1 deletion src/query/api/v1/handler/prometheus/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ type Values []Value
type Value []interface{}

func (t *Tags) genID() string {
tags := make(sort.StringSlice, len(*t))
tags := make(sort.StringSlice, 0, len(*t))
for k, v := range *t {
tags = append(tags, fmt.Sprintf("%s:%s,", k, v))
}
Expand Down