mirror of
https://github.com/mjl-/mox.git
synced 2025-07-14 18:14:38 +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:
@ -35,7 +35,7 @@ var accountapiJSON []byte
|
||||
//go:embed account.html
|
||||
var accountHTML []byte
|
||||
|
||||
var accountDoc = mustParseAPI(accountapiJSON)
|
||||
var accountDoc = mustParseAPI("account", accountapiJSON)
|
||||
|
||||
var accountSherpaHandler http.Handler
|
||||
|
||||
|
@ -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