diff --git a/api/api_test.go b/api/api_test.go index 06978c5..85207e4 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -17,10 +17,14 @@ func TestHTTPClientTimeout(t *testing.T) { }) // Create a test server that introduces a delay - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - time.Sleep(200 * time.Millisecond) // Delay longer than client timeout - w.WriteHeader(http.StatusOK) - })) + testServer := httptest.NewServer( + http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + time.Sleep( + 200 * time.Millisecond, + ) // Delay longer than client timeout + w.WriteHeader(http.StatusOK) + }), + ) defer testServer.Close() // Make a request to the test server @@ -43,10 +47,14 @@ func TestHTTPClientTimeoutPass(t *testing.T) { }) // Create a test server that introduces a delay - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - time.Sleep(200 * time.Millisecond) // Delay shorter than client timeout - w.WriteHeader(http.StatusOK) - })) + testServer := httptest.NewServer( + http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + time.Sleep( + 200 * time.Millisecond, + ) // Delay shorter than client timeout + w.WriteHeader(http.StatusOK) + }), + ) defer testServer.Close() // Make a request to the test server diff --git a/config/config.go b/config/config.go index 4ab2bee..54bd462 100644 --- a/config/config.go +++ b/config/config.go @@ -33,9 +33,9 @@ type LoggingConfig struct { } type ApiConfig struct { - ListenAddress string `yaml:"address" envconfig:"API_LISTEN_ADDRESS"` - ListenPort uint `yaml:"port" envconfig:"API_LISTEN_PORT"` - ClientTimeout uint `yaml:"client_timeout" envconfig:"CLIENT_TIMEOUT"` + ListenAddress string `yaml:"address" envconfig:"API_LISTEN_ADDRESS"` + ListenPort uint `yaml:"port" envconfig:"API_LISTEN_PORT"` + ClientTimeout uint `yaml:"client_timeout" envconfig:"CLIENT_TIMEOUT"` } // Singleton config instance with default values