Move errors to gemini.go

This commit is contained in:
adnano
2020-10-13 20:10:04 -04:00
parent 2c1081966d
commit 4189a4f717
4 changed files with 13 additions and 23 deletions

6
fs.go
View File

@@ -1,7 +1,6 @@
package gmi
import (
"errors"
"io"
"mime"
"os"
@@ -15,11 +14,6 @@ func init() {
mime.AddExtensionType(".gemini", "text/gemini")
}
// FileServer errors.
var (
ErrNotAFile = errors.New("gemini: not a file")
)
// FileServer takes a filesystem and returns a Handler which uses that filesystem.
// The returned Handler sanitizes paths before handling them.
func FileServer(fsys FS) Handler {