rename convertToStrings -> strTime

This commit is contained in:
aditya-K2 2021-10-17 11:21:26 +05:30
parent a8f6c78461
commit 7ce6def361
2 changed files with 2 additions and 2 deletions

View File

@ -58,6 +58,6 @@ func (s *progressBar) updateProgress(conn mpd.Client){
du , err := strconv.ParseFloat(_status["duration"], 8) du , err := strconv.ParseFloat(_status["duration"], 8)
percentage := el / du * 100 percentage := el / du * 100
if err == nil && err1 == nil{ if err == nil && err1 == nil{
s.t.GetCell(1,0).Text = getText(float64(_width), percentage, convertToStrings(el) + "/" + convertToStrings(du) + "(" + strconv.FormatFloat(percentage, 'f', 2, 32) + "%" + ")") s.t.GetCell(1,0).Text = getText(float64(_width), percentage, strTime(el) + "/" + strTime(du) + "(" + strconv.FormatFloat(percentage, 'f', 2, 32) + "%" + ")")
} }
} }

View File

@ -4,7 +4,7 @@ import(
"strconv" "strconv"
) )
func convertToStrings(e float64) string{ func strTime(e float64) string{
a := int(e) a := int(e)
var min, seconds string var min, seconds string
if (a/60 < 10){ if (a/60 < 10){