Why did Emacs autocomp reference then dereference vars

This commit is contained in:
Jeffrey Serio 2023-03-25 21:20:35 -05:00
parent 849df7e18c
commit d5b6595e6f
1 changed files with 17 additions and 17 deletions

34
main.go
View File

@ -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{}