chore: linter: embeddedstructfieldcheck

Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Jakob Borg
2025-10-23 22:48:54 +02:00
parent df8d8c276e
commit 7c9d06b4d2
36 changed files with 54 additions and 11 deletions
+2
View File
@@ -11,6 +11,7 @@ import "github.com/syncthing/syncthing/lib/config"
// invalidListener is never valid
type invalidListener struct {
listenerFactory
err error
}
@@ -25,6 +26,7 @@ func (i invalidListener) Valid(_ config.Configuration) error {
// invalidDialer is never valid
type invalidDialer struct {
dialerFactory
err error
}
+4 -2
View File
@@ -225,8 +225,9 @@ func getRateLimiter(m map[protocol.DeviceID]*rate.Limiter, deviceID protocol.Dev
// limitedReader is a rate limited io.Reader
type limitedReader struct {
reader io.Reader
waiterHolder
reader io.Reader
}
func (r *limitedReader) Read(buf []byte) (int, error) {
@@ -239,8 +240,9 @@ func (r *limitedReader) Read(buf []byte) (int, error) {
// limitedWriter is a rate limited io.Writer
type limitedWriter struct {
writer io.Writer
waiterHolder
writer io.Writer
}
func (w *limitedWriter) Write(buf []byte) (int, error) {
+1
View File
@@ -39,6 +39,7 @@ func init() {
type quicDialer struct {
commonDialer
registry *registry.Registry
}
+2 -2
View File
@@ -39,10 +39,10 @@ func init() {
type quicListener struct {
svcutil.ServiceWithError
nat atomic.Uint64 // Holds a stun.NATType.
onAddressesChangedNotifier
nat atomic.Uint64 // Holds a stun.NATType.
uri *url.URL
cfg config.Wrapper
tlsCfg *tls.Config
+1
View File
@@ -42,6 +42,7 @@ func quicNetwork(uri *url.URL) string {
type quicTlsConn struct {
quic.Connection
quic.Stream
// If we created this connection, we should be the ones closing it.
createdConn net.PacketConn
}
+1
View File
@@ -39,6 +39,7 @@ type tlsConn interface {
// came from (type, priority).
type internalConn struct {
tlsConn
connType connType
isLocal bool
priority int
+1
View File
@@ -27,6 +27,7 @@ func init() {
type tcpDialer struct {
commonDialer
registry *registry.Registry
}