mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-07-20 10:04:08 +00:00
Fix linter
This commit is contained in:
parent
22f48c5ad3
commit
b65044712b
4 changed files with 3 additions and 12 deletions
|
@ -3,13 +3,13 @@ package server
|
|||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"crypto/rand"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
"heckel.io/ntfy/v2/user"
|
||||
"io"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/netip"
|
||||
|
|
|
@ -69,7 +69,7 @@ func TestTopic_Subscribe_DuplicateID(t *testing.T) {
|
|||
t.Parallel()
|
||||
to := newTopic("mytopic")
|
||||
|
||||
// Fix random seed to force same number generation
|
||||
//lint:ignore SA1019 Fix random seed to force same number generation
|
||||
rand.Seed(1)
|
||||
a := rand.Int()
|
||||
to.subscribers[a] = &topicSubscriber{
|
||||
|
@ -82,7 +82,7 @@ func TestTopic_Subscribe_DuplicateID(t *testing.T) {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Force rand.Int to generate the same id once more
|
||||
//lint:ignore SA1019 Force rand.Int to generate the same id once more
|
||||
rand.Seed(1)
|
||||
id := to.Subscribe(subFn, "b", func() {})
|
||||
res := to.subscribers[id]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue