diff options
| author | Shulhan <ms@kilabit.info> | 2024-04-17 23:51:53 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-04-18 00:41:07 +0700 |
| commit | a28f1684d9b427149f7a8f03f865bdf57eafc08e (patch) | |
| tree | a9b9244afedef99490d453672dc8b56e662f90bf /server.go | |
| parent | 51d14a2686c8ec0dbd876312dd76eec54df0d617 (diff) | |
| download | kamusku-a28f1684d9b427149f7a8f03f865bdf57eafc08e.tar.xz | |
all: rename the module to "kamusku"
Diffstat (limited to 'server.go')
| -rw-r--r-- | server.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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) |
