chore: Fix linter findings for `revive:comment-spacings` (part 3) (#15898)
This commit is contained in:
parent
453d32bd81
commit
253a114622
|
|
@ -15,7 +15,7 @@ import (
|
||||||
|
|
||||||
func TestPubSub_WriteSingle(t *testing.T) {
|
func TestPubSub_WriteSingle(t *testing.T) {
|
||||||
testMetrics := []testMetric{
|
testMetrics := []testMetric{
|
||||||
{testutil.TestMetric("value_1", "test"), false /*return error */},
|
{testutil.TestMetric("value_1", "test"), false},
|
||||||
}
|
}
|
||||||
|
|
||||||
settings := pubsub.DefaultPublishSettings
|
settings := pubsub.DefaultPublishSettings
|
||||||
|
|
@ -31,7 +31,7 @@ func TestPubSub_WriteSingle(t *testing.T) {
|
||||||
|
|
||||||
func TestPubSub_WriteWithAttribute(t *testing.T) {
|
func TestPubSub_WriteWithAttribute(t *testing.T) {
|
||||||
testMetrics := []testMetric{
|
testMetrics := []testMetric{
|
||||||
{testutil.TestMetric("value_1", "test"), false /*return error*/},
|
{testutil.TestMetric("value_1", "test"), false},
|
||||||
}
|
}
|
||||||
|
|
||||||
settings := pubsub.DefaultPublishSettings
|
settings := pubsub.DefaultPublishSettings
|
||||||
|
|
@ -52,7 +52,7 @@ func TestPubSub_WriteWithAttribute(t *testing.T) {
|
||||||
|
|
||||||
func TestPubSub_WriteMultiple(t *testing.T) {
|
func TestPubSub_WriteMultiple(t *testing.T) {
|
||||||
testMetrics := []testMetric{
|
testMetrics := []testMetric{
|
||||||
{testutil.TestMetric("value_1", "test"), false /*return error*/},
|
{testutil.TestMetric("value_1", "test"), false},
|
||||||
{testutil.TestMetric("value_2", "test"), false},
|
{testutil.TestMetric("value_2", "test"), false},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -70,7 +70,7 @@ func TestPubSub_WriteMultiple(t *testing.T) {
|
||||||
|
|
||||||
func TestPubSub_WriteOverCountThreshold(t *testing.T) {
|
func TestPubSub_WriteOverCountThreshold(t *testing.T) {
|
||||||
testMetrics := []testMetric{
|
testMetrics := []testMetric{
|
||||||
{testutil.TestMetric("value_1", "test"), false /*return error*/},
|
{testutil.TestMetric("value_1", "test"), false},
|
||||||
{testutil.TestMetric("value_2", "test"), false},
|
{testutil.TestMetric("value_2", "test"), false},
|
||||||
{testutil.TestMetric("value_3", "test"), false},
|
{testutil.TestMetric("value_3", "test"), false},
|
||||||
{testutil.TestMetric("value_4", "test"), false},
|
{testutil.TestMetric("value_4", "test"), false},
|
||||||
|
|
@ -91,7 +91,7 @@ func TestPubSub_WriteOverCountThreshold(t *testing.T) {
|
||||||
|
|
||||||
func TestPubSub_WriteOverByteThreshold(t *testing.T) {
|
func TestPubSub_WriteOverByteThreshold(t *testing.T) {
|
||||||
testMetrics := []testMetric{
|
testMetrics := []testMetric{
|
||||||
{testutil.TestMetric("value_1", "test"), false /*return error*/},
|
{testutil.TestMetric("value_1", "test"), false},
|
||||||
{testutil.TestMetric("value_2", "test"), false},
|
{testutil.TestMetric("value_2", "test"), false},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -111,7 +111,7 @@ func TestPubSub_WriteOverByteThreshold(t *testing.T) {
|
||||||
|
|
||||||
func TestPubSub_WriteBase64Single(t *testing.T) {
|
func TestPubSub_WriteBase64Single(t *testing.T) {
|
||||||
testMetrics := []testMetric{
|
testMetrics := []testMetric{
|
||||||
{testutil.TestMetric("value_1", "test"), false /*return error */},
|
{testutil.TestMetric("value_1", "test"), false},
|
||||||
{testutil.TestMetric("value_2", "test"), false},
|
{testutil.TestMetric("value_2", "test"), false},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -145,7 +145,7 @@ func TestPubSub_Error(t *testing.T) {
|
||||||
|
|
||||||
func TestPubSub_WriteGzipSingle(t *testing.T) {
|
func TestPubSub_WriteGzipSingle(t *testing.T) {
|
||||||
testMetrics := []testMetric{
|
testMetrics := []testMetric{
|
||||||
{testutil.TestMetric("value_1", "test"), false /*return error */},
|
{testutil.TestMetric("value_1", "test"), false},
|
||||||
{testutil.TestMetric("value_2", "test"), false},
|
{testutil.TestMetric("value_2", "test"), false},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -167,7 +167,7 @@ func TestPubSub_WriteGzipSingle(t *testing.T) {
|
||||||
|
|
||||||
func TestPubSub_WriteGzipAndBase64Single(t *testing.T) {
|
func TestPubSub_WriteGzipAndBase64Single(t *testing.T) {
|
||||||
testMetrics := []testMetric{
|
testMetrics := []testMetric{
|
||||||
{testutil.TestMetric("value_1", "test"), false /*return error */},
|
{testutil.TestMetric("value_1", "test"), false},
|
||||||
{testutil.TestMetric("value_2", "test"), false},
|
{testutil.TestMetric("value_2", "test"), false},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -285,7 +285,7 @@ func TestTagSanitization(t *testing.T) {
|
||||||
expected: []string{"word", "`word`", "word_"},
|
expected: []string{"word", "`word`", "word_"},
|
||||||
input: []string{"word", "`word`", "word_"},
|
input: []string{"word", "`word`", "word_"},
|
||||||
},
|
},
|
||||||
{ //sanitize tags containing UnsopportedCharacter on IoTDB V1.3 enclosing them in backticks
|
{ // sanitize tags containing UnsupportedCharacter on IoTDB V1.3 enclosing them in backticks
|
||||||
name: "Sanitize Tags",
|
name: "Sanitize Tags",
|
||||||
plugin: func() *IoTDB { s := newIoTDB(); s.SanitizeTags = "1.3"; return s }(),
|
plugin: func() *IoTDB { s := newIoTDB(); s.SanitizeTags = "1.3"; return s }(),
|
||||||
expected: []string{"`wo rd`", "`@`", "`$`", "`#`", "`:`", "`{`", "`}`", "`1`", "`1234`"},
|
expected: []string{"`wo rd`", "`@`", "`$`", "`#`", "`:`", "`{`", "`}`", "`1`", "`1234`"},
|
||||||
|
|
@ -303,7 +303,7 @@ func TestTagSanitization(t *testing.T) {
|
||||||
expected: []string{"word", "`word`", "word_", "@", "$", "#", ":", "{", "}"},
|
expected: []string{"word", "`word`", "word_", "@", "$", "#", ":", "{", "}"},
|
||||||
input: []string{"word", "`word`", "word_", "@", "$", "#", ":", "{", "}"},
|
input: []string{"word", "`word`", "word_", "@", "$", "#", ":", "{", "}"},
|
||||||
},
|
},
|
||||||
{ //sanitize tags containing UnsopportedCharacter on IoTDB V0.13 enclosing them in backticks
|
{ // sanitize tags containing UnsupportedCharacter on IoTDB V0.13 enclosing them in backticks
|
||||||
name: "Sanitize Tags",
|
name: "Sanitize Tags",
|
||||||
plugin: func() *IoTDB { s := newIoTDB(); s.SanitizeTags = "0.13"; return s }(),
|
plugin: func() *IoTDB { s := newIoTDB(); s.SanitizeTags = "0.13"; return s }(),
|
||||||
expected: []string{"`wo rd`", "`\\`"},
|
expected: []string{"`wo rd`", "`\\`"},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue