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/example_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/example_server_test.go')
| -rw-r--r-- | lib/http/example_server_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/http/example_server_test.go b/lib/http/example_server_test.go index 2cf897c0..c9575172 100644 --- a/lib/http/example_server_test.go +++ b/lib/http/example_server_test.go @@ -53,7 +53,7 @@ func ExampleServer_customHTTPStatusCode() { Call: func(epr *EndpointRequest) ( resbody []byte, err error, ) { - epr.HttpWriter.WriteHeader(exp.Status) + epr.HTTPWriter.WriteHeader(exp.Status) return json.Marshal(exp) }, } @@ -67,7 +67,7 @@ func ExampleServer_customHTTPStatusCode() { time.Sleep(1 * time.Second) clientOpts := &ClientOptions{ - ServerUrl: "http://127.0.0.1:8123", + ServerURL: `http://127.0.0.1:8123`, } client := NewClient(clientOpts) |
