1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 11:31:46 +00:00

chore: auto format code

This commit is contained in:
Tw93
2026-01-14 03:59:21 +00:00
parent 7089ce69d1
commit 00a712711e
3 changed files with 12 additions and 12 deletions

View File

@@ -99,11 +99,11 @@ perform_purge() {
truncate_path() {
local path="$1"
local term_cols
term_cols=$(tput cols 2>/dev/null || echo 80)
term_cols=$(tput cols 2> /dev/null || echo 80)
# Reserve some space for the spinner and text (approx 20 chars)
local max_len=$((term_cols - 20))
# Ensure a reasonable minimum width
if (( max_len < 40 )); then
if ((max_len < 40)); then
max_len=40
fi

View File

@@ -62,14 +62,14 @@ func TestColorizeTempThresholds(t *testing.T) {
temp float64
expected string
}{
{temp: 30.0, expected: "30.0"}, // Normal - should use okStyle (green)
{temp: 55.9, expected: "55.9"}, // Just below warning threshold
{temp: 56.0, expected: "56.0"}, // Warning threshold - should use warnStyle (yellow)
{temp: 65.0, expected: "65.0"}, // Mid warning range
{temp: 75.9, expected: "75.9"}, // Just below danger threshold
{temp: 76.0, expected: "76.0"}, // Danger threshold - should use dangerStyle (red)
{temp: 90.0, expected: "90.0"}, // High temperature
{temp: 0.0, expected: "0.0"}, // Edge case: zero
{temp: 30.0, expected: "30.0"}, // Normal - should use okStyle (green)
{temp: 55.9, expected: "55.9"}, // Just below warning threshold
{temp: 56.0, expected: "56.0"}, // Warning threshold - should use warnStyle (yellow)
{temp: 65.0, expected: "65.0"}, // Mid warning range
{temp: 75.9, expected: "75.9"}, // Just below danger threshold
{temp: 76.0, expected: "76.0"}, // Danger threshold - should use dangerStyle (red)
{temp: 90.0, expected: "90.0"}, // High temperature
{temp: 0.0, expected: "0.0"}, // Edge case: zero
}
for _, tt := range tests {

View File

@@ -415,8 +415,8 @@ readonly DATA_PROTECTED_BUNDLES=(
"com.netease.163music" # NetEase Music
# Web Browsers (protect complex storage like IndexedDB, localStorage)
"Firefox" # Firefox Application Support
"org.mozilla.*" # Firefox bundle IDs
"Firefox" # Firefox Application Support
"org.mozilla.*" # Firefox bundle IDs
# License Management & App Stores
"com.paddle.Paddle*" # Paddle (license management)