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 409b515

Browse filesBrowse files
author
Luca Bianconi
committed
style: naming
1 parent 2d5c5f0 commit 409b515
Copy full SHA for 409b515

File tree

Expand file treeCollapse file tree

4 files changed

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

4 files changed

+5
-5
lines changed

‎buildcache/build_cache.go

Copy file name to clipboardExpand all lines: buildcache/build_cache.go
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import (
2121
"github.com/arduino/go-paths-helper"
2222
)
2323

24-
// GetOrCreate registers the .last-used time in the directory
25-
func GetOrCreate(dir *paths.Path) error {
24+
// Used registers the .last-used time in the directory
25+
func Used(dir *paths.Path) error {
2626
unusedTTL := time.Hour
2727
_, err := newDirectoryCache(dir.Parent().String(), unusedTTL).
2828
GetOrCreate(dir.Base(), time.Now())

‎buildcache/build_cache_test.go

Copy file name to clipboardExpand all lines: buildcache/build_cache_test.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func Test_UpdateLastUsedFileExisting(t *testing.T) {
4949
}
5050

5151
func requireCorrectUpdate(t *testing.T, dir *paths.Path, prevModTime time.Time) {
52-
err := GetOrCreate(dir)
52+
err := Used(dir)
5353
require.Nil(t, err)
5454
expectedFile := dir.Join(lastUsedFileName)
5555
fileInfo, err := os.Stat(expectedFile.String())

‎commands/compile/compile.go

Copy file name to clipboardExpand all lines: commands/compile/compile.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func Compile(ctx context.Context, req *rpc.CompileRequest, outStream, errStream
216216
r.UsedLibraries = importedLibs
217217
}()
218218

219-
defer buildcache.GetOrCreate(builderCtx.BuildPath)
219+
defer buildcache.Used(builderCtx.BuildPath)
220220

221221
// if it's a regular build, go on...
222222
if err := builder.RunBuilder(builderCtx); err != nil {

‎legacy/builder/phases/core_builder.go

Copy file name to clipboardExpand all lines: legacy/builder/phases/core_builder.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func compileCore(ctx *types.Context, buildPath *paths.Path, buildCachePath *path
123123

124124
// archive core.a
125125
if targetArchivedCore != nil && !ctx.OnlyUpdateCompilationDatabase {
126-
defer buildcache.GetOrCreate(targetArchivedCore)
126+
defer buildcache.Used(targetArchivedCore)
127127
targetArchivedCoreDir.MkdirAll()
128128
err := archiveFile.CopyTo(targetArchivedCore)
129129
if ctx.Verbose {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.