Removing Globals

Globals are no longer needed instead I am connecting each part with (
what were previously ) globals. Also Renaming SetRenderer to
ConnectRenderer which describes the name more precisely
This commit is contained in:
aditya-K2
2021-12-23 20:20:27 +05:30
parent b587f5acfd
commit f56eb1cf1f
2 changed files with 16 additions and 25 deletions

View File

@@ -2,9 +2,10 @@ package ui
import (
"fmt"
"github.com/fhs/gompd/mpd"
"strconv"
"github.com/fhs/gompd/mpd"
"github.com/aditya-K2/gomp/utils"
"github.com/aditya-K2/tview"
@@ -21,7 +22,7 @@ func SetConnection(c *mpd.Client) {
CONN = c
}
func SetRenderer(r interface{ Send(string) }) {
func ConnectRenderer(r interface{ Send(string) }) {
RENDERER = r
}