Skip to content

Commit 42e8b03

Browse files
author
Luca Bianconi
committed
style: lint
1 parent 776d66c commit 42e8b03

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: buildcache/build_cache.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ import (
2525

2626
const lastUsedFileName = ".last-used"
2727

28-
type buildCache struct {
28+
type BuildCache struct {
2929
baseDir *paths.Path
3030
}
3131

3232
// GetOrCreate retrieves or creates the cache directory at the given path
3333
// If the cache already exists the lifetime of the cache is extended.
34-
func (bc *buildCache) GetOrCreate(key string) (*paths.Path, error) {
34+
func (bc *BuildCache) GetOrCreate(key string) (*paths.Path, error) {
3535
keyDir := bc.baseDir.Join(key)
3636
if err := keyDir.MkdirAll(); err != nil {
3737
return nil, err
@@ -46,7 +46,7 @@ func (bc *buildCache) GetOrCreate(key string) (*paths.Path, error) {
4646
// Purge removes all cache directories within baseDir that have expired
4747
// To know how long ago a directory has been last used
4848
// it checks into the .last-used file.
49-
func (bc *buildCache) Purge(ttl time.Duration) {
49+
func (bc *BuildCache) Purge(ttl time.Duration) {
5050
files, err := bc.baseDir.ReadDir()
5151
if err != nil {
5252
return
@@ -59,8 +59,8 @@ func (bc *buildCache) Purge(ttl time.Duration) {
5959
}
6060

6161
// New instantiates a build cache
62-
func New(baseDir *paths.Path) *buildCache {
63-
return &buildCache{baseDir}
62+
func New(baseDir *paths.Path) *BuildCache {
63+
return &BuildCache{baseDir}
6464
}
6565

6666
func removeIfExpired(dir *paths.Path, ttl time.Duration) {

0 commit comments

Comments
 (0)