diff options
author | Yoan Blanc <yoan@dosimple.ch> | 2019-12-25 03:26:57 +0100 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2019-12-25 10:26:57 +0800 |
commit | 76b87b1bbd9dcbb1adf0192b1168905565fea774 (patch) | |
tree | 35ab1e30bc0131ca4810f1dd2ad2025fdeb657db /internal/route/api/v1/repo | |
parent | 1b929e3afce638b808c30074ec0461c72e636abc (diff) |
repo: use editorconfig v2 (#5888)
* repo: editorconfig v2
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
* fixup! repo: editorconfig v2
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
* Update repo.go
* Update repo.go
Co-authored-by: Unknwon <u@gogs.io>
Diffstat (limited to 'internal/route/api/v1/repo')
-rw-r--r-- | internal/route/api/v1/repo/file.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/route/api/v1/repo/file.go b/internal/route/api/v1/repo/file.go index 47907af7..6b1cf470 100644 --- a/internal/route/api/v1/repo/file.go +++ b/internal/route/api/v1/repo/file.go @@ -53,7 +53,11 @@ func GetEditorconfig(c *context.APIContext) { } fileName := c.Params("filename") - def := ec.GetDefinitionForFilename(fileName) + def, err := ec.GetDefinitionForFilename(fileName) + if err != nil { + c.ServerError("GetDefinitionForFilename", err) + return + } if def == nil { c.NotFound() return |