Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 42e8b03

Browse filesBrowse files
author
Luca Bianconi
committed
style: lint
1 parent 776d66c commit 42e8b03
Copy full SHA for 42e8b03

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed

‎buildcache/build_cache.go

Copy file name to clipboardExpand all lines: buildcache/build_cache.go
+5-5Lines changed: 5 additions & 5 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.