diff --git a/app/publisher/publish_test.go b/app/publisher/publish_test.go index 681678ce9..ac45d05d0 100644 --- a/app/publisher/publish_test.go +++ b/app/publisher/publish_test.go @@ -244,6 +244,9 @@ func TestPublishMembers(t *testing.T) { } members, err := pr.subjectMembers(res.Meta) + if err != nil { + t.Errorf("subjectMembers: %v", err) + } if len(members.Members) != 2 { t.Errorf("Expected two members in publish root (one camlipath, one camlimember), got %d", len(members.Members)) } diff --git a/app/scanningcabinet/datastore.go b/app/scanningcabinet/datastore.go index f84ea571c..c2bb54bc2 100644 --- a/app/scanningcabinet/datastore.go +++ b/app/scanningcabinet/datastore.go @@ -20,6 +20,7 @@ import ( "context" "errors" "fmt" + "log" "os" "sort" "strconv" @@ -151,8 +152,9 @@ func (h *handler) describeScan(b *search.DescribedBlob) (mediaObject, error) { if documentRef != "" { var ok bool document, ok = blob.Parse(documentRef) - if ok { + if !ok { // TODO(mpl): more to be done here ? Do we ever want to display something about the document of a scan ? + log.Printf("warning: failed to parse document ref %q", documentRef) } } content, ok := blob.Parse(attrs.Get("camliContent")) diff --git a/app/scanningcabinet/handler.go b/app/scanningcabinet/handler.go index a96292393..0b493f758 100644 --- a/app/scanningcabinet/handler.go +++ b/app/scanningcabinet/handler.go @@ -300,7 +300,6 @@ func baseURL(r *http.Request) string { func (h *handler) handleUploadURL(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "text/plain") fmt.Fprintf(w, "%supload", baseURL(r)) - return } func (h *handler) handleUpload(w http.ResponseWriter, r *http.Request) { @@ -455,7 +454,6 @@ func (h *handler) handleResource(w http.ResponseWriter, r *http.Request) { ih.MaxHeight = resized } ih.ServeHTTP(w, r, mediaObject.contentRef) - return } func (h *handler) handleMakedoc(w http.ResponseWriter, r *http.Request) { diff --git a/app/scanningcabinet/scancab/scancab.go b/app/scanningcabinet/scancab/scancab.go index a42e31a38..934f551d1 100644 --- a/app/scanningcabinet/scancab/scancab.go +++ b/app/scanningcabinet/scancab/scancab.go @@ -500,6 +500,4 @@ func main() { } scan() - - return } diff --git a/app/scanningcabinet/ui/fileembed.go b/app/scanningcabinet/ui/fileembed.go index 28beb3c6e..0afa4ab6d 100644 --- a/app/scanningcabinet/ui/fileembed.go +++ b/app/scanningcabinet/ui/fileembed.go @@ -19,6 +19,8 @@ TODO(steve.armstrong): Until app/scanningcabinet/handler.go handleUiFile() properly manages Content-Type, be sure to update it whenever adding a new file type to the pattern below. */ + +// Package ui contains the embedded JS/CSS assets for the scanningcabinet app. package ui // import "perkeep.org/app/scanningcabinet/ui" import "embed"