Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/util/sys
diff options
context:
space:
mode:
authorIlya Kryuchkov <42733472+kr-ilya@users.noreply.github.com>2026-01-05 07:54:56 +0300
committerGitHub <noreply@github.com>2026-01-05 07:54:56 +0300
commit6041d10e3d5d8b0021dd596bdee8f0064a495f80 (patch)
tree897ac55d8389dfea859e6071d08c56f97e843a09 /util/sys
parent4800f8fb706a092a38255ee70904227238b2a6f6 (diff)
Refactor code and fix linter warnings (#3627)
* refactor: use any instead of empty interface * refactor: code cleanup
Diffstat (limited to 'util/sys')
-rw-r--r--util/sys/sys_darwin.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/sys/sys_darwin.go b/util/sys/sys_darwin.go
index 6ecc78c0..b635b549 100644
--- a/util/sys/sys_darwin.go
+++ b/util/sys/sys_darwin.go
@@ -47,11 +47,11 @@ func CPUPercentRaw() (float64, error) {
var out [5]uint64
switch len(raw) {
case 5 * 8:
- for i := 0; i < 5; i++ {
+ for i := range 5 {
out[i] = binary.LittleEndian.Uint64(raw[i*8 : (i+1)*8])
}
case 5 * 4:
- for i := 0; i < 5; i++ {
+ for i := range 5 {
out[i] = uint64(binary.LittleEndian.Uint32(raw[i*4 : (i+1)*4]))
}
default: