Skip to content

Commit

Permalink
plugins: (sys-stats) Rename cpuutil to cu
Browse files Browse the repository at this point in the history
  • Loading branch information
5HT2 committed Oct 24, 2023
1 parent 142a800 commit 510a59f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/sys-stats/sys-stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/5HT2/taro-bot/bot"
"github.com/5HT2/taro-bot/cmd"
"github.com/5HT2/taro-bot/plugins"
cpuutil "github.com/5HT2/taro-bot/util/cpu"
cu "github.com/5HT2/taro-bot/util/cpu"
"github.com/mackerelio/go-osstat/cpu"
"github.com/mackerelio/go-osstat/memory"
"github.com/mackerelio/go-osstat/uptime"
Expand Down Expand Up @@ -152,7 +152,7 @@ func SysStatsCommand(c bot.Command) error {
s[3] = fmt.Sprintf(
"%.2f%% (%v cores)",
float64(cpuAfter.User-cpuBefore.User)/float64(cpuAfter.Total-cpuBefore.Total)*100,
cpuutil.GetCoresStr(cpuAfter),
cu.GetCoresStr(cpuAfter),
)

s[4] = fmt.Sprintf(
Expand Down

0 comments on commit 510a59f

Please sign in to comment.