all repos — homestead @ a9f47f4e4ed3223e86dc1d5c3edd005b8d9ce589

Code for my website

refactor: return errors with stack traces, where appropriate

Alan Pearce
commit

a9f47f4e4ed3223e86dc1d5c3edd005b8d9ce589

parent

f17c0bd9ce8ad16b39c9c5ba80c917049e135bed

1 file changed, 6 insertions(+), 5 deletions(-)

changed files
M internal/storage/interface.gointernal/storage/interface.go
@@ -1,21 +1,22 @@
package storage import ( + "gitlab.com/tozd/go/errors" "go.alanpearce.eu/homestead/internal/buffer" "go.alanpearce.eu/homestead/internal/content" ) type Reader interface { - GetFile(path string) (*File, error) + GetFile(path string) (*File, errors.E) CanonicalisePath(path string) (string, bool) } type Writer interface { - Mkdirp(path string) error + Mkdirp(path string) errors.E NewFileFromPost(post *content.Post) *File - Write(pathname string, title string, content *buffer.Buffer) error - WritePost(post *content.Post, content *buffer.Buffer) error - WriteFile(file *File, content *buffer.Buffer) error + Write(pathname string, title string, content *buffer.Buffer) errors.E + WritePost(post *content.Post, content *buffer.Buffer) errors.E + WriteFile(file *File, content *buffer.Buffer) errors.E }