mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 17:44:35 +03:00
move "link or copy" functionality to moxio
and add a bit more logging for unexpected failures when closing files. and make tests pass with a TMPDIR on a different filesystem than the testdata directory.
This commit is contained in:
@ -59,14 +59,14 @@ var adminapiJSON []byte
|
||||
//go:embed admin.html
|
||||
var adminHTML []byte
|
||||
|
||||
var adminDoc = mustParseAPI(adminapiJSON)
|
||||
var adminDoc = mustParseAPI("admin", adminapiJSON)
|
||||
|
||||
var adminSherpaHandler http.Handler
|
||||
|
||||
func mustParseAPI(buf []byte) (doc sherpadoc.Section) {
|
||||
func mustParseAPI(api string, buf []byte) (doc sherpadoc.Section) {
|
||||
err := json.Unmarshal(buf, &doc)
|
||||
if err != nil {
|
||||
xlog.Fatalx("parsing api docs", err)
|
||||
xlog.Fatalx("parsing api docs", err, mlog.Field("api", api))
|
||||
}
|
||||
return doc
|
||||
}
|
||||
|
Reference in New Issue
Block a user