1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-22 18:30:08 +00:00

fix(clean): respect whitelist when cleaning Go caches (#530)

- Add whitelist checking to clean_dev_go() function
- Check both GOCACHE and GOMODCACHE before cleaning
- Show appropriate messages for protected caches
- Fix whitelist pattern from ~/go/pkg/mod/cache/* to ~/go/pkg/mod/*
- Split Go cache into separate build and module entries

Fixes #521
This commit is contained in:
Noah Qin
2026-03-03 15:57:45 +08:00
committed by GitHub
parent 66ba1889c6
commit 5d4c304797
2 changed files with 46 additions and 4 deletions

View File

@@ -94,8 +94,8 @@ VS Code extension and update cache|$HOME/Library/Application Support/Code/Cached
VS Code system cache (Cursor, VSCodium)|$HOME/Library/Caches/com.microsoft.VSCode/*|ide_cache
Cursor editor cache|$HOME/Library/Caches/com.todesktop.230313mzl4w4u92/*|ide_cache
Bazel build cache|$HOME/.cache/bazel/*|compiler_cache
Go build cache and module cache|$HOME/Library/Caches/go-build/*|compiler_cache
Go module cache|$HOME/go/pkg/mod/cache/*|compiler_cache
Go build cache|$HOME/Library/Caches/go-build/*|compiler_cache
Go module cache|$HOME/go/pkg/mod/*|compiler_cache
Rust Cargo registry cache|$HOME/.cargo/registry/cache/*|compiler_cache
Rust documentation cache|$HOME/.rustup/toolchains/*/share/doc/*|compiler_cache
Rustup toolchain downloads|$HOME/.rustup/downloads/*|compiler_cache