aboutsummaryrefslogtreecommitdiff
path: root/questdb_client.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-03-16 18:07:08 +0700
committerShulhan <ms@kilabit.info>2024-03-16 18:07:08 +0700
commitf3043736f137e3bd37543af22dbca566db2bee81 (patch)
treea0f1e28fc43d2c45a16c254b093ce211eaf5e4a1 /questdb_client.go
parent916d1874a7047162d0894191c0979d47422786a3 (diff)
downloadhaminer-f3043736f137e3bd37543af22dbca566db2bee81.tar.xz
all: comply with all linters recommendations
Some of breaking changes, * Field [Config.HttpUrl] renamed to [Config.HTTPURL] * Field [ConfigForwarder.Url] renamed to [ConfigForwarder.URL] * Struct [HttpLog] renamed to [HTTPLog]
Diffstat (limited to 'questdb_client.go')
-rw-r--r--questdb_client.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/questdb_client.go b/questdb_client.go
index 562e55c..d185978 100644
--- a/questdb_client.go
+++ b/questdb_client.go
@@ -24,10 +24,10 @@ type questdbClient struct {
buf bytes.Buffer
}
-// newQuestdbClient create and initialize client connection using the Url in
+// newQuestdbClient create and initialize client connection using the URL in
// the ConfigForwarder.
func newQuestdbClient(cfg *ConfigForwarder) (questc *questdbClient, err error) {
- if cfg == nil || len(cfg.Url) == 0 {
+ if cfg == nil || len(cfg.URL) == 0 {
return nil, nil
}
@@ -41,7 +41,7 @@ func newQuestdbClient(cfg *ConfigForwarder) (questc *questdbClient, err error) {
port uint16
)
- surl, err = url.Parse(cfg.Url)
+ surl, err = url.Parse(cfg.URL)
if err != nil {
return nil, fmt.Errorf(`%s: %w`, logp, err)
}
@@ -69,12 +69,12 @@ func newQuestdbClient(cfg *ConfigForwarder) (questc *questdbClient, err error) {
// Forwards implement the Forwarder interface.
// It will write all logs to questdb.
-func (questc *questdbClient) Forwards(logs []*HttpLog) {
+func (questc *questdbClient) Forwards(logs []*HTTPLog) {
var (
logp = `questdbClient: Forwards`
now = time.Now()
- httpLog *HttpLog
+ httpLog *HTTPLog
data []byte
err error
)