1
0

Replaced unused r arg with _ in handlers.

This commit is contained in:
Alexander Andreev 2023-10-01 01:32:17 +04:00
parent 2e6f9f27c4
commit 3d2b172deb
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -15,19 +15,19 @@ func NewDJHandlers(listeners *radio.Listeners) *DJHandlers {
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")
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()
w.WriteHeader(http.StatusCreated)
w.Header().Add("Content-Type", "text/plain")
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()
if err != nil {
log.Print(err)