File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed
Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 11module github.com/markthree/clean-cache
22
33go 1.21.0
4+
5+ require github.com/fatih/color v1.15.0
6+
7+ require (
8+ github.com/mattn/go-colorable v0.1.13 // indirect
9+ github.com/mattn/go-isatty v0.0.17 // indirect
10+ golang.org/x/sys v0.6.0 // indirect
11+ )
Original file line number Diff line number Diff line change 1+ github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs =
2+ github.com/fatih/color v1.15.0 /go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw =
3+ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA =
4+ github.com/mattn/go-colorable v0.1.13 /go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg =
5+ github.com/mattn/go-isatty v0.0.16 /go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM =
6+ github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng =
7+ github.com/mattn/go-isatty v0.0.17 /go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM =
8+ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab /go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg =
9+ golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ =
10+ golang.org/x/sys v0.6.0 /go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg =
Original file line number Diff line number Diff line change 11package main
22
3+ import (
4+ "fmt"
5+ "os"
6+
7+ "github.com/fatih/color"
8+ )
9+
10+ func isHelp () bool {
11+ for _ , v := range os .Args {
12+ if v == "-h" || v == "--help" || v == "help" {
13+ return true
14+ }
15+ }
16+ return false
17+ }
18+
319func main () {
420
21+ if isHelp () {
22+ fmt .Print ("\n " )
23+ color .Cyan ("clean-cache" )
24+ fmt .Print ("Description: go 写的清理 node 项目缓存,超级无敌快\n \n " )
25+ os .Exit (0 )
26+ }
27+
528}
You can’t perform that action at this time.
0 commit comments