Rename conn -> CONN ( Also made it Global )
Following Changes have been made: 1. conn -> CONN 2. CONN is now a global as a lot of functions were requiring it and passing them as a parameter didn't seem intuitive. 3. In progressBar.go now we are sending only the short path instead of absolute path.
This commit is contained in:
5
App.go
5
App.go
@@ -1,7 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/fhs/gompd/mpd"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rivo/tview"
|
||||
)
|
||||
@@ -16,9 +15,9 @@ type Application struct {
|
||||
pBar *progressBar
|
||||
}
|
||||
|
||||
func newApplication(conn mpd.Client, r *Renderer) *Application {
|
||||
func newApplication(r *Renderer) *Application {
|
||||
|
||||
var pBar *progressBar = newProgressBar(conn, r)
|
||||
var pBar *progressBar = newProgressBar(r)
|
||||
expandedView := tview.NewTable()
|
||||
Navbar := tview.NewTable()
|
||||
searchBar := tview.NewTable()
|
||||
|
||||
Reference in New Issue
Block a user