diff options
| author | Shulhan <ms@kilabit.info> | 2024-03-02 18:28:58 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-03-05 14:53:03 +0700 |
| commit | b921ebfb3e81b367ff24305eb18c5dd073b38635 (patch) | |
| tree | 89c88e32ad92af2ade65dec6552ddd06ddc0cd90 /lib/http/server_test.go | |
| parent | 901c9803e6f93e0d5ee282f4061309022c46f490 (diff) | |
| download | pakakeh.go-b921ebfb3e81b367ff24305eb18c5dd073b38635.tar.xz | |
all: comply with linter recommendations #1
Instead of annotating the lines that caught by linters, fix it to comply
with the recommendations.
This causes several breaking changes, especially related to naming,
* api/slack: [Message.IconUrl] become [Message.IconURL]
* lib/dns: DefaultSoaMinumumTtl become DefaultSoaMinimumTTL
* lib/email: [Message.SetBodyHtml] become [Message.SetBodyHTML]
* lib/http: [Client.GenerateHttpRequest] become
[Client.GenerateHTTPRequest]
* lib/http: [ClientOptions.ServerUrl] become [ClientOptions.ServerURL]
* lib/http: [EndpointRequest.HttpWriter] become
[EndpointRequest.HTTPWriter]
* lib/http: [EndpointRequest.HttpRequest] become
[EndpointRequest.HTTPRequest]
* lib/http: [ServerOptions.EnableIndexHtml] become
[ServerOptions.EnableIndexHTML]
* lib/http: [SSEConn.HttpRequest] become [SSEConn.HTTPRequest]
* lib/smtp: [ClientOptions.ServerUrl] become [ClientOptions.ServerURL]
* lib/ssh/sftp: [FileAttrs.SetUid] become [FileAttrs.SetUID]
* lib/ssh/sftp: [FileAttrs.Uid] become [FileAttrs.UID]
Diffstat (limited to 'lib/http/server_test.go')
| -rw-r--r-- | lib/http/server_test.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/http/server_test.go b/lib/http/server_test.go index e1d4d3f7..4d573540 100644 --- a/lib/http/server_test.go +++ b/lib/http/server_test.go @@ -910,7 +910,7 @@ func TestServer_Options_HandleFS(t *testing.T) { func TestServer_handleRange(t *testing.T) { var ( clOpts = &ClientOptions{ - ServerUrl: testServerURL, + ServerURL: testServerURL, } cl = NewClient(clOpts) skipHeaders = []string{HeaderDate, HeaderETag} @@ -986,7 +986,7 @@ func TestServer_handleRange(t *testing.T) { func TestServer_handleRange_HEAD(t *testing.T) { var ( clOpts = &ClientOptions{ - ServerUrl: testServerURL, + ServerURL: testServerURL, } cl = NewClient(clOpts) @@ -1055,7 +1055,12 @@ func TestServerHandleRangeBig(t *testing.T) { ) srv = runServerFS(t, serverAddress, tempDir) - defer srv.Stop(100 * time.Millisecond) + defer func() { + var errStop = srv.Stop(100 * time.Millisecond) + if errStop != nil { + log.Fatal(errStop) + } + }() var ( tdata *test.Data @@ -1069,7 +1074,7 @@ func TestServerHandleRangeBig(t *testing.T) { var ( clOpts = &ClientOptions{ - ServerUrl: `http://` + serverAddress, + ServerURL: `http://` + serverAddress, } cl *Client ) |
