Documentation
¶
Index ¶
- func GetPage(ldelim string, rdelim string, filename ...string) (*template.Template, error)
- func HandleHTTP(h Handler) http.HandlerFunc
- type Context
- func (this *Context) Redirect(url string, code int)
- func (this *Context) SetCookie(c http.Cookie)
- func (this *Context) WriteByteIO(b byte) error
- func (this *Context) WriteIO(b []byte) (int, error)
- func (this *Context) WriteRuneIO(r rune) (int, error)
- func (this *Context) WriteStringIO(s string) (int, error)
- func (this *Context) WriteToIO(w io.Writer) (int64, error)
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPage ¶
func (this* Context) GetPage(ldelim string,rdelim string,filename ...string) (*template.Template,error){
tmp,err := template.New("").Delims(ldelim,rdelim).ParseFiles(filename...)
return tmp,err
}
func HandleHTTP ¶
func HandleHTTP(h Handler) http.HandlerFunc
Types ¶
type Context ¶
type Context struct {
RespWriter http.ResponseWriter
Request *http.Request
IO *bufio.ReadWriter // reader from body and writer to conn
Headers http.Header
Cookies []*http.Cookie
RemoteAddr string
}
func (*Context) WriteByteIO ¶
Click to show internal directories.
Click to hide internal directories.