mirror of
https://github.com/prometheus/alertmanager
synced 2025-02-16 10:37:09 +00:00
Fix up golangci-lint errors.
Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
parent
8be6fd79d9
commit
53535551f5
@ -522,7 +522,7 @@ func getHashBuffer() []byte {
|
||||
|
||||
func putHashBuffer(b []byte) {
|
||||
b = b[:0]
|
||||
//lint:ignore SA6002 relax staticcheck verification.
|
||||
//nolint:staticcheck // Ignore SA6002 relax staticcheck verification.
|
||||
hashBuffers.Put(b)
|
||||
}
|
||||
|
||||
|
@ -309,6 +309,7 @@ func TestMultiStage(t *testing.T) {
|
||||
if !reflect.DeepEqual(alerts, alerts1) {
|
||||
t.Fatal("Input not equal to input of MultiStage")
|
||||
}
|
||||
//nolint:staticcheck // Ignore SA1029
|
||||
ctx = context.WithValue(ctx, "key", "value")
|
||||
return ctx, alerts2, nil
|
||||
}),
|
||||
|
@ -122,7 +122,7 @@ func (c *Collector) Check() string {
|
||||
for _, exp := range expected {
|
||||
found := len(exp) == 0 && len(alerts) == 0
|
||||
|
||||
report += fmt.Sprintf("---\n")
|
||||
report += "---\n"
|
||||
|
||||
for _, e := range exp {
|
||||
report += fmt.Sprintf("- %v\n", c.opts.alertString(e))
|
||||
@ -136,10 +136,10 @@ func (c *Collector) Check() string {
|
||||
}
|
||||
|
||||
if found {
|
||||
report += fmt.Sprintf(" [ ✓ ]\n")
|
||||
report += " [ ✓ ]\n"
|
||||
} else {
|
||||
c.t.Fail()
|
||||
report += fmt.Sprintf(" [ ✗ ]\n")
|
||||
report += " [ ✗ ]\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ func (c *Collector) check() string {
|
||||
for _, exp := range expected {
|
||||
found := len(exp) == 0 && len(alerts) == 0
|
||||
|
||||
report += fmt.Sprintf("---\n")
|
||||
report += "---\n"
|
||||
|
||||
for _, e := range exp {
|
||||
report += fmt.Sprintf("- %v\n", c.opts.alertString(e))
|
||||
@ -127,10 +127,10 @@ func (c *Collector) check() string {
|
||||
}
|
||||
|
||||
if found {
|
||||
report += fmt.Sprintf(" [ ✓ ]\n")
|
||||
report += " [ ✓ ]\n"
|
||||
} else {
|
||||
c.t.Fail()
|
||||
report += fmt.Sprintf(" [ ✗ ]\n")
|
||||
report += " [ ✗ ]\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ func (c *Collector) Check() string {
|
||||
for _, exp := range expected {
|
||||
found := len(exp) == 0 && len(alerts) == 0
|
||||
|
||||
report += fmt.Sprintf("---\n")
|
||||
report += "---\n"
|
||||
|
||||
for _, e := range exp {
|
||||
report += fmt.Sprintf("- %v\n", c.opts.alertString(e))
|
||||
@ -136,10 +136,10 @@ func (c *Collector) Check() string {
|
||||
}
|
||||
|
||||
if found {
|
||||
report += fmt.Sprintf(" [ ✓ ]\n")
|
||||
report += " [ ✓ ]\n"
|
||||
} else {
|
||||
c.t.Fail()
|
||||
report += fmt.Sprintf(" [ ✗ ]\n")
|
||||
report += " [ ✗ ]\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user