Replaced unused r arg with _ in handlers.
This commit is contained in:
parent
2e6f9f27c4
commit
3d2b172deb
@ -15,19 +15,19 @@ func NewDJHandlers(listeners *radio.Listeners) *DJHandlers {
|
|||||||
return &DJHandlers{listeners: listeners}
|
return &DJHandlers{listeners: listeners}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dj *DJHandlers) ListenersGet(w http.ResponseWriter, r *http.Request) {
|
func (dj *DJHandlers) ListenersGet(w http.ResponseWriter, _ *http.Request) {
|
||||||
w.Header().Add("Content-Type", "text/plain")
|
w.Header().Add("Content-Type", "text/plain")
|
||||||
fmt.Fprint(w, dj.listeners.Current(), dj.listeners.Peak())
|
fmt.Fprint(w, dj.listeners.Current(), dj.listeners.Peak())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dj *DJHandlers) ListenersInc(w http.ResponseWriter, r *http.Request) {
|
func (dj *DJHandlers) ListenersInc(w http.ResponseWriter, _ *http.Request) {
|
||||||
l := dj.listeners.Inc()
|
l := dj.listeners.Inc()
|
||||||
w.WriteHeader(http.StatusCreated)
|
w.WriteHeader(http.StatusCreated)
|
||||||
w.Header().Add("Content-Type", "text/plain")
|
w.Header().Add("Content-Type", "text/plain")
|
||||||
fmt.Fprint(w, l)
|
fmt.Fprint(w, l)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dj *DJHandlers) ListenersDec(w http.ResponseWriter, r *http.Request) {
|
func (dj *DJHandlers) ListenersDec(w http.ResponseWriter, _ *http.Request) {
|
||||||
l, err := dj.listeners.Dec()
|
l, err := dj.listeners.Dec()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Print(err)
|
log.Print(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user