From 5474934cea5a918ad4f79558993c6d336ffb47f8 Mon Sep 17 00:00:00 2001 From: "Ricardo (XenGi) Band" Date: Mon, 15 Jul 2024 10:51:53 +0200 Subject: [PATCH] add docstrings to go code --- server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server.go b/server.go index d145897..ae2e3c8 100644 --- a/server.go +++ b/server.go @@ -16,6 +16,7 @@ import ( "strings" ) +// Config holds the configuration for the mpd connection and for the web server. type Config struct { MPD struct { Hostname string `ini:"hostname"` @@ -112,6 +113,7 @@ func main() { } } +// wsServe handles websocket connections. func wsServe(c echo.Context) error { websocket.Handler(func(ws *websocket.Conn) { defer ws.Close() @@ -182,6 +184,7 @@ func wsServe(c echo.Context) error { return nil } +// downloadTrack tries to download a given URL and saves the song to the database. func downloadTrack(c echo.Context) error { // yt-dlp \ // --no-wait-for-video \