@@ -33,7 +33,6 @@ import (
33
33
34
34
"gitea.com/go-chi/cache"
35
35
"gitea.com/go-chi/session"
36
- chi "github.com/go-chi/chi/v5"
37
36
"github.com/unknwon/com"
38
37
"github.com/unknwon/i18n"
39
38
"github.com/unrolled/render"
@@ -50,7 +49,7 @@ type Render interface {
50
49
type Context struct {
51
50
* BaseContext
52
51
PageData map [string ]interface {} // data used by JavaScript modules in one page, it's `window.config.pageData`
53
- Render Render
52
+ Render Render
54
53
translation.Locale
55
54
Cache cache.Cache
56
55
csrf CSRF
@@ -317,16 +316,6 @@ func (ctx *Context) ServeContent(name string, r io.ReadSeeker, params ...interfa
317
316
http .ServeContent (ctx .Resp , ctx .Req , name , modtime , r )
318
317
}
319
318
320
- // PlainText render content as plain text, this will override basecontext's method
321
- // because we need a beautiful failed page
322
- func (ctx * Context ) PlainText (status int , bs []byte ) {
323
- ctx .Resp .WriteHeader (status )
324
- ctx .Resp .Header ().Set ("Content-Type" , "text/plain;charset=utf-8" )
325
- if _ , err := ctx .Resp .Write (bs ); err != nil {
326
- ctx .ServerError ("Write bytes failed" , err )
327
- }
328
- }
329
-
330
319
// ServeStream serves file via io stream
331
320
func (ctx * Context ) ServeStream (rd io.Reader , name string ) {
332
321
ctx .Resp .Header ().Set ("Content-Description" , "File Transfer" )
0 commit comments