Apply fmt

This commit is contained in:
Savely Krendelhoff 2025-08-23 18:52:32 +07:00
parent 78beb401fe
commit c9fb9f91c1
No known key found for this signature in database
GPG key ID: F70DFD34F40238DE
17 changed files with 79 additions and 85 deletions

View file

@ -7,7 +7,6 @@ import (
"hash-of-wisdom/internal/pow/challenge"
)
// ChallengeRequest is empty (no payload for challenge requests)
type ChallengeRequest struct{}

View file

@ -8,7 +8,6 @@ import (
"hash-of-wisdom/internal/quotes"
)
// ChallengeResponse represents a challenge response
type ChallengeResponse struct {
Challenge *challenge.Challenge

View file

@ -113,7 +113,6 @@ func TestChallengeRequest_EmptyPayload(t *testing.T) {
require.NoError(t, err)
}
func TestPayloadStream_LimitedRead(t *testing.T) {
decoder := NewMessageDecoder()

View file

@ -30,7 +30,6 @@ type TCPServer struct {
// Option is a functional option for configuring TCPServer
type option func(*TCPServer)
// WithLogger sets a custom logger
func WithLogger(logger *slog.Logger) option {
return func(s *TCPServer) {
@ -54,7 +53,6 @@ func NewTCPServer(wisdomService *service.WisdomService, config *Config, opts ...
return server
}
// Start starts the TCP server
func (s *TCPServer) Start(ctx context.Context) error {
listener, err := net.Listen("tcp", s.config.Address)

View file

@ -47,7 +47,6 @@ func TestSlowlorisProtection_SlowReader(t *testing.T) {
assert.Error(t, err, "Connection should be closed due to slow reading")
}
func TestSlowlorisProtection_SlowConnectionTimeout(t *testing.T) {
// Setup server with very short connection timeout for testing
serverConfig := &server.Config{