add docstrings to go code
This commit is contained in:
		
							parent
							
								
									1705de7391
								
							
						
					
					
						commit
						5474934cea
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -16,6 +16,7 @@ import (
 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Config holds the configuration for the mpd connection and for the web server.
 | 
				
			||||||
type Config struct {
 | 
					type Config struct {
 | 
				
			||||||
	MPD struct {
 | 
						MPD struct {
 | 
				
			||||||
		Hostname string `ini:"hostname"`
 | 
							Hostname string `ini:"hostname"`
 | 
				
			||||||
| 
						 | 
					@ -112,6 +113,7 @@ func main() {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// wsServe handles websocket connections.
 | 
				
			||||||
func wsServe(c echo.Context) error {
 | 
					func wsServe(c echo.Context) error {
 | 
				
			||||||
	websocket.Handler(func(ws *websocket.Conn) {
 | 
						websocket.Handler(func(ws *websocket.Conn) {
 | 
				
			||||||
		defer ws.Close()
 | 
							defer ws.Close()
 | 
				
			||||||
| 
						 | 
					@ -182,6 +184,7 @@ func wsServe(c echo.Context) error {
 | 
				
			||||||
	return nil
 | 
						return nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// downloadTrack tries to download a given URL and saves the song to the database.
 | 
				
			||||||
func downloadTrack(c echo.Context) error {
 | 
					func downloadTrack(c echo.Context) error {
 | 
				
			||||||
	// yt-dlp \
 | 
						// yt-dlp \
 | 
				
			||||||
	// --no-wait-for-video \
 | 
						// --no-wait-for-video \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue