mirror of
https://github.com/nektos/act.git
synced 2024-09-11 12:35:25 +03:00
* feat: port
* fix: use httprouter
* fix: WriteHeader
* fix: bolthold
* fix: bugs
* chore: one less file
* test: test handler
* fix: bug in id
* test: fix cases
* chore: tidy
* fix: use atomic.Int32
* fix: use atomic.Store
* feat: support close
* chore: lint
* fix: cache keys are case insensitive
* fix: options
* fix: use options
* fix: close
* fix: ignore close error
* Revert "fix: close"
This reverts commit d53ea7568b
.
* fix: cacheUrlKey
* fix: nil close
* chore: lint code
* fix: test key
* test: case insensitive
* chore: lint
28 lines
373 B
Go
28 lines
373 B
Go
package cmd
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
var (
|
|
UserHomeDir string
|
|
CacheHomeDir string
|
|
)
|
|
|
|
func init() {
|
|
home, err := os.UserHomeDir()
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
UserHomeDir = home
|
|
|
|
if v := os.Getenv("XDG_CACHE_HOME"); v != "" {
|
|
CacheHomeDir = v
|
|
} else {
|
|
CacheHomeDir = filepath.Join(UserHomeDir, ".cache")
|
|
}
|
|
}
|