mirror of
https://codeberg.org/hyperreal/go-transmission-stats
synced 2024-11-25 12:13:42 +01:00
Why did Emacs autocomp reference then dereference vars
This commit is contained in:
parent
849df7e18c
commit
d5b6595e6f
34
main.go
34
main.go
@ -91,29 +91,29 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sessionStats := []SessionStat{
|
sessionStats := []SessionStat{
|
||||||
{Label: "Active torrent count", Value: fmt.Sprintf("%d", *&stats.ActiveTorrentCount)},
|
{Label: "Active torrent count", Value: fmt.Sprintf("%d", stats.ActiveTorrentCount)},
|
||||||
{Label: "Download speed", Value: fmt.Sprintf("%s/sec", byteCountIEC(*&stats.DownloadSpeed))},
|
{Label: "Download speed", Value: fmt.Sprintf("%s/sec", byteCountIEC(stats.DownloadSpeed))},
|
||||||
{Label: "Upload speed", Value: fmt.Sprintf("%s/sec", byteCountIEC(*&stats.UploadSpeed))},
|
{Label: "Upload speed", Value: fmt.Sprintf("%s/sec", byteCountIEC(stats.UploadSpeed))},
|
||||||
{Label: "Paused torrent count", Value: fmt.Sprintf("%d", *&stats.PausedTorrentCount)},
|
{Label: "Paused torrent count", Value: fmt.Sprintf("%d", stats.PausedTorrentCount)},
|
||||||
{Label: "Torrent count", Value: fmt.Sprintf("%d", *&stats.TorrentCount)},
|
{Label: "Torrent count", Value: fmt.Sprintf("%d", stats.TorrentCount)},
|
||||||
}
|
}
|
||||||
|
|
||||||
currentStats := []SessionStat{
|
currentStats := []SessionStat{
|
||||||
{Label: "Uploaded bytes", Value: fmt.Sprintf("%s", byteCountIEC(*&stats.CurrentStats.UploadedBytes))},
|
{Label: "Uploaded bytes", Value: fmt.Sprintf("%s", byteCountIEC(stats.CurrentStats.UploadedBytes))},
|
||||||
{Label: "Downloaded bytes", Value: fmt.Sprintf("%s", byteCountIEC(*&stats.CurrentStats.DownloadedBytes))},
|
{Label: "Downloaded bytes", Value: fmt.Sprintf("%s", byteCountIEC(stats.CurrentStats.DownloadedBytes))},
|
||||||
{Label: "Uploaded/Downloaded ratio", Value: fmt.Sprintf("%d", *&stats.CurrentStats.UploadedBytes / *&stats.CurrentStats.DownloadedBytes)},
|
{Label: "Uploaded/Downloaded ratio", Value: fmt.Sprintf("%d", stats.CurrentStats.UploadedBytes/stats.CurrentStats.DownloadedBytes)},
|
||||||
{Label: "Files added", Value: fmt.Sprintf("%d", *&stats.CurrentStats.FilesAdded)},
|
{Label: "Files added", Value: fmt.Sprintf("%d", stats.CurrentStats.FilesAdded)},
|
||||||
{Label: "Session count", Value: fmt.Sprintf("%d", *&stats.CurrentStats.SessionCount)},
|
{Label: "Session count", Value: fmt.Sprintf("%d", stats.CurrentStats.SessionCount)},
|
||||||
{Label: "Time active", Value: convertTime(*&stats.CurrentStats.SecondsActive)},
|
{Label: "Time active", Value: convertTime(stats.CurrentStats.SecondsActive)},
|
||||||
}
|
}
|
||||||
|
|
||||||
cumulativeStats := []SessionStat{
|
cumulativeStats := []SessionStat{
|
||||||
{Label: "Uploaded bytes", Value: fmt.Sprintf("%s", byteCountIEC(*&stats.CumulativeStats.UploadedBytes))},
|
{Label: "Uploaded bytes", Value: fmt.Sprintf("%s", byteCountIEC(stats.CumulativeStats.UploadedBytes))},
|
||||||
{Label: "Downloaded bytes", Value: fmt.Sprintf("%s", byteCountIEC(*&stats.CumulativeStats.DownloadedBytes))},
|
{Label: "Downloaded bytes", Value: fmt.Sprintf("%s", byteCountIEC(stats.CumulativeStats.DownloadedBytes))},
|
||||||
{Label: "Uploaded/Downloaded ratio", Value: fmt.Sprintf("%d", *&stats.CumulativeStats.UploadedBytes / *&stats.CumulativeStats.DownloadedBytes)},
|
{Label: "Uploaded/Downloaded ratio", Value: fmt.Sprintf("%d", stats.CumulativeStats.UploadedBytes/stats.CumulativeStats.DownloadedBytes)},
|
||||||
{Label: "Files added", Value: fmt.Sprintf("%d", *&stats.CumulativeStats.FilesAdded)},
|
{Label: "Files added", Value: fmt.Sprintf("%d", stats.CumulativeStats.FilesAdded)},
|
||||||
{Label: "Session count", Value: fmt.Sprintf("%d", *&stats.CumulativeStats.SessionCount)},
|
{Label: "Session count", Value: fmt.Sprintf("%d", stats.CumulativeStats.SessionCount)},
|
||||||
{Label: "Time active", Value: convertTime(*&stats.CumulativeStats.SecondsActive)},
|
{Label: "Time active", Value: convertTime(stats.CumulativeStats.SecondsActive)},
|
||||||
}
|
}
|
||||||
|
|
||||||
var torrentInfo = []TorrentInfo{}
|
var torrentInfo = []TorrentInfo{}
|
||||||
|
Loading…
Reference in New Issue
Block a user