diff options
| author | Shulhan <ms@kilabit.info> | 2021-03-04 12:43:14 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-03-04 12:43:14 +0700 |
| commit | c5ec00bb91744d00ef7a8fefb719f2e1a962c72c (patch) | |
| tree | ebd3a79d2507dedb7946a082b3b8beaacd88c7e9 | |
| parent | f0ce04a4dbb1fb41705afa93ba566a1587f2607c (diff) | |
| download | ciigo-c5ec00bb91744d00ef7a8fefb719f2e1a962c72c.tar.xz | |
all: update with latest share module
| -rw-r--r-- | go.mod | 2 | ||||
| -rw-r--r-- | go.sum | 10 | ||||
| -rw-r--r-- | server.go | 7 |
3 files changed, 5 insertions, 14 deletions
@@ -4,7 +4,7 @@ go 1.14 require ( git.sr.ht/~shulhan/asciidoctor-go v0.0.0-20201226102329-36285ff15434 - github.com/shuLhan/share v0.23.1-0.20210220203139-c1ad6a68b1fe + github.com/shuLhan/share v0.23.1-0.20210303203144-6442d1f4055a ) //replace git.sr.ht/~shulhan/asciidoctor-go => ../asciidoctor-go @@ -1,20 +1,14 @@ -git.sr.ht/~shulhan/asciidoctor-go v0.0.0-20201205130914-be765f32b57b/go.mod h1:ejaxKeBMNL5EpP2zjRP4B8zuOr+MM4ZyGwE3y7807WI= git.sr.ht/~shulhan/asciidoctor-go v0.0.0-20201226102329-36285ff15434 h1:1iZnuHKdzhHgZePCmk47xTWoZCmqQG0Vpo/Nwk6SeYo= git.sr.ht/~shulhan/asciidoctor-go v0.0.0-20201226102329-36285ff15434/go.mod h1:ejaxKeBMNL5EpP2zjRP4B8zuOr+MM4ZyGwE3y7807WI= -git.sr.ht/~shulhan/ciigo v0.3.0/go.mod h1:Y5FvSiJg88qshoR1ktj4fLzM5sk1pZcV0kJGU8GAuTo= -git.sr.ht/~shulhan/ciigo v0.3.1-0.20210109200358-c23bd42ef521/go.mod h1:DLyaapVphRtqry80iqw+luWAKepHtbDmbvxqFmulcko= github.com/shuLhan/share v0.20.2-0.20201122173411-e8b3bf5ee6e9/go.mod h1:oBv+CGHG6u4Sa71+nJJJji8mCgPAadywjsB3I3k/b0o= -github.com/shuLhan/share v0.20.2-0.20201205202022-66069b9e49fe/go.mod h1:oBv+CGHG6u4Sa71+nJJJji8mCgPAadywjsB3I3k/b0o= -github.com/shuLhan/share v0.22.1-0.20210109185915-0490a19341d9/go.mod h1:u9caerexlcxmPVDttj7PnkxCBDY6yBRTZ+gGR+1tO98= -github.com/shuLhan/share v0.23.1-0.20210220203139-c1ad6a68b1fe h1:quKB8ABlVHnqwmp2QwUi9NrN8eTgtFgrfATNFvfRw8k= -github.com/shuLhan/share v0.23.1-0.20210220203139-c1ad6a68b1fe/go.mod h1:y4+p5vUmKNNhMMhU6yGgE6QxTgJxA4nv6OOq+cIf7wU= +github.com/shuLhan/share v0.23.1-0.20210303203144-6442d1f4055a h1:ZgIYnibYPhU+yigJ0/HB1ILHP9HOCDsYqoLlpVBZpVs= +github.com/shuLhan/share v0.23.1-0.20210303203144-6442d1f4055a/go.mod h1:c6xnA1EctNz2KGVlekfydyXoUjpTPjyUHUIyWSELN/c= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201224014010-6772e930b67b h1:iFwSg7t5GZmB/Q5TjiEAsdoLDrdJRC1RiF2WhuV29Qw= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -8,7 +8,6 @@ import ( "bytes" "fmt" "html/template" - "net/http" "strings" "github.com/shuLhan/share/lib/debug" @@ -112,13 +111,11 @@ func (srv *server) start() (err error) { return nil } -func (srv *server) onSearch(res http.ResponseWriter, req *http.Request, reqBody []byte) ( - resBody []byte, err error, -) { +func (srv *server) onSearch(epr *libhttp.EndpointRequest) (resBody []byte, err error) { var bufSearch, buf bytes.Buffer logp := "onSearch" - q := req.Form.Get("q") + q := epr.HttpRequest.Form.Get("q") results := srv.http.Memfs.Search(strings.Fields(q), 0) err = srv.htmlg.tmplSearch.Execute(&bufSearch, results) |
