aboutsummaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'server.go')
-rw-r--r--server.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/server.go b/server.go
index c027446..28891b4 100644
--- a/server.go
+++ b/server.go
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2020 M. Shulhan <ms@kilabit.info>
// SPDX-License-Identifier: GPL-3.0-or-later
-package kamusd
+package kamusku
import (
"context"
@@ -13,18 +13,18 @@ import (
"sync"
"time"
- "git.sr.ht/~shulhan/kamusku"
+ "git.sr.ht/~shulhan/kbbi"
"git.sr.ht/~shulhan/pakakeh.go/lib/ascii"
libhttp "git.sr.ht/~shulhan/pakakeh.go/lib/http"
)
-// Server for kamusku with caching and spell checking functionalities.
+// Server for kbbi with caching and spell checking functionalities.
type Server struct {
httpd *libhttp.Server
kamus *dictionary
// The client that forward request to official KBBI server.
- kbbic *kamusku.KbbiClient
+ kbbic *kbbi.Client
stopped chan bool
wg sync.WaitGroup
@@ -64,7 +64,7 @@ func NewServer(dictionaryStorage string) (server *Server, err error) {
return nil, fmt.Errorf(`%s: %w`, logp, err)
}
- server.kbbic, err = kamusku.NewKbbiClient()
+ server.kbbic, err = kbbi.NewClient()
if err != nil {
return nil, fmt.Errorf(`%s: %w`, logp, err)
}
@@ -148,7 +148,7 @@ func (server *Server) handleDefinisi(epr *libhttp.EndpointRequest) (resBody []by
}
inputs := strings.Split(paramKata, ",")
- res := make(kamusku.LookupResponse, len(inputs))
+ res := make(kbbi.LookupResponse, len(inputs))
for _, in := range inputs {
in = strings.TrimSpace(in)