mirror of
https://codeberg.org/hyperreal/go-transmission-stats
synced 2024-11-01 16:53:10 +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{
|
||||
{Label: "Active torrent count", Value: fmt.Sprintf("%d", *&stats.ActiveTorrentCount)},
|
||||
{Label: "Download speed", Value: fmt.Sprintf("%s/sec", byteCountIEC(*&stats.DownloadSpeed))},
|
||||
{Label: "Upload speed", Value: fmt.Sprintf("%s/sec", byteCountIEC(*&stats.UploadSpeed))},
|
||||
{Label: "Paused torrent count", Value: fmt.Sprintf("%d", *&stats.PausedTorrentCount)},
|
||||
{Label: "Torrent count", Value: fmt.Sprintf("%d", *&stats.TorrentCount)},
|
||||
{Label: "Active torrent count", Value: fmt.Sprintf("%d", stats.ActiveTorrentCount)},
|
||||
{Label: "Download speed", Value: fmt.Sprintf("%s/sec", byteCountIEC(stats.DownloadSpeed))},
|
||||
{Label: "Upload speed", Value: fmt.Sprintf("%s/sec", byteCountIEC(stats.UploadSpeed))},
|
||||
{Label: "Paused torrent count", Value: fmt.Sprintf("%d", stats.PausedTorrentCount)},
|
||||
{Label: "Torrent count", Value: fmt.Sprintf("%d", stats.TorrentCount)},
|
||||
}
|
||||
|
||||
currentStats := []SessionStat{
|
||||
{Label: "Uploaded bytes", Value: fmt.Sprintf("%s", byteCountIEC(*&stats.CurrentStats.UploadedBytes))},
|
||||
{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: "Files added", Value: fmt.Sprintf("%d", *&stats.CurrentStats.FilesAdded)},
|
||||
{Label: "Session count", Value: fmt.Sprintf("%d", *&stats.CurrentStats.SessionCount)},
|
||||
{Label: "Time active", Value: convertTime(*&stats.CurrentStats.SecondsActive)},
|
||||
{Label: "Uploaded bytes", Value: fmt.Sprintf("%s", byteCountIEC(stats.CurrentStats.UploadedBytes))},
|
||||
{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: "Files added", Value: fmt.Sprintf("%d", stats.CurrentStats.FilesAdded)},
|
||||
{Label: "Session count", Value: fmt.Sprintf("%d", stats.CurrentStats.SessionCount)},
|
||||
{Label: "Time active", Value: convertTime(stats.CurrentStats.SecondsActive)},
|
||||
}
|
||||
|
||||
cumulativeStats := []SessionStat{
|
||||
{Label: "Uploaded bytes", Value: fmt.Sprintf("%s", byteCountIEC(*&stats.CumulativeStats.UploadedBytes))},
|
||||
{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: "Files added", Value: fmt.Sprintf("%d", *&stats.CumulativeStats.FilesAdded)},
|
||||
{Label: "Session count", Value: fmt.Sprintf("%d", *&stats.CumulativeStats.SessionCount)},
|
||||
{Label: "Time active", Value: convertTime(*&stats.CumulativeStats.SecondsActive)},
|
||||
{Label: "Uploaded bytes", Value: fmt.Sprintf("%s", byteCountIEC(stats.CumulativeStats.UploadedBytes))},
|
||||
{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: "Files added", Value: fmt.Sprintf("%d", stats.CumulativeStats.FilesAdded)},
|
||||
{Label: "Session count", Value: fmt.Sprintf("%d", stats.CumulativeStats.SessionCount)},
|
||||
{Label: "Time active", Value: convertTime(stats.CumulativeStats.SecondsActive)},
|
||||
}
|
||||
|
||||
var torrentInfo = []TorrentInfo{}
|
||||
|
Loading…
Reference in New Issue
Block a user