mirror of https://github.com/perkeep/perkeep.git
app/...: fix staticcheck warnings
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
This commit is contained in:
parent
526640422e
commit
45f873a1c8
|
@ -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))
|
||||
}
|
||||
|
|
|
@ -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"))
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -500,6 +500,4 @@ func main() {
|
|||
}
|
||||
|
||||
scan()
|
||||
|
||||
return
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue