From bf521e82e0128a2cc31a51f866fd5a86dc677a87 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Fri, 23 Oct 2020 11:46:58 +0200 Subject: refactored type.go Moved structures for in/out HTTP data into reqres.go and added basic doc comments. A few minor edits as well to make things consistent. --- handler.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'handler.go') diff --git a/handler.go b/handler.go index 10defba..b6a52f8 100644 --- a/handler.go +++ b/handler.go @@ -115,9 +115,8 @@ func unpackRequest(r *http.Request, unpack interface{}) error { // getEntries provides a list of entries from the Trillian backend func getEntries(ctx context.Context, i *instance, w http.ResponseWriter, r *http.Request) (int, error) { glog.Info("in getEntries") - - var request GetEntriesRequest - if err := request.Unpack(r); err != nil { + request, err := NewGetEntriesRequest(r) + if err != nil { return http.StatusBadRequest, err } -- cgit v1.2.3