Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultServeMux = &ServeMux{commands: make(map[string]Handler)}
Functions ¶
func HandleFunc ¶
func HandleFunc(pattern string, handler func(*ResponseWriter, *Request))
func ListenAndServe ¶
Types ¶
type Handler ¶
type Handler interface {
Serve(*ResponseWriter, *Request)
}
type HandlerFunc ¶
type HandlerFunc func(*ResponseWriter, *Request)
func (HandlerFunc) Serve ¶
func (f HandlerFunc) Serve(w *ResponseWriter, r *Request)
type ResponseWriter ¶
type ResponseWriter struct {
tgbotapi.MessageConfig
}
type ServeMux ¶
type ServeMux struct {
// contains filtered or unexported fields
}
func NewServeMux ¶
func NewServeMux() *ServeMux
func (*ServeMux) HandleFunc ¶
func (mux *ServeMux) HandleFunc(command string, handler func(*ResponseWriter, *Request))
func (*ServeMux) Serve ¶
func (mux *ServeMux) Serve(w *ResponseWriter, r *Request)
Click to show internal directories.
Click to hide internal directories.