mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-18 11:33:03 -06:00
linting
This commit is contained in:
parent
3640267014
commit
6b22779f3b
2 changed files with 5 additions and 5 deletions
|
|
@ -65,7 +65,7 @@ type router struct {
|
||||||
|
|
||||||
// Add Gin StaticFile handler
|
// Add Gin StaticFile handler
|
||||||
func (r *router) AttachStaticFS(relativePath string, fs http.FileSystem) {
|
func (r *router) AttachStaticFS(relativePath string, fs http.FileSystem) {
|
||||||
r.engine.StaticFS(relativePath, fs);
|
r.engine.StaticFS(relativePath, fs)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start starts the router nicely.
|
// Start starts the router nicely.
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ func (fs FileSystem) Open(path string) (http.File, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
s, err := f.Stat()
|
s, _ := f.Stat()
|
||||||
if s.IsDir() {
|
if s.IsDir() {
|
||||||
index := strings.TrimSuffix(path, "/") + "/index.html"
|
index := strings.TrimSuffix(path, "/") + "/index.html"
|
||||||
if _, err := fs.fs.Open(index); err != nil {
|
if _, err := fs.fs.Open(index); err != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue