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

Sign up
Appearance settings

Commit 9ecb877

Browse files
make the Index.isTrusted property unexported
1 parent 605ac83 commit 9ecb877

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

‎arduino/cores/packageindex/index.go‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import (
3434
//easyjson:json
3535
type Index struct {
3636
Packages []*indexPackage `json:"packages"`
37-
IsTrusted bool
37+
isTrusted bool
3838
isInstalledJSON bool
3939
}
4040

@@ -145,7 +145,7 @@ var tr = i18n.Tr
145145
// with the existing contents of the cores.Packages passed as parameter.
146146
func (index Index) MergeIntoPackages(outPackages cores.Packages) {
147147
for _, inPackage := range index.Packages {
148-
inPackage.extractPackageIn(outPackages, index.IsTrusted, index.isInstalledJSON)
148+
inPackage.extractPackageIn(outPackages, index.isTrusted, index.isInstalledJSON)
149149
}
150150
}
151151

@@ -213,7 +213,7 @@ func IndexFromPlatformRelease(pr *cores.PlatformRelease) Index {
213213
}
214214

215215
return Index{
216-
IsTrusted: pr.IsTrusted,
216+
isTrusted: pr.IsTrusted,
217217
Packages: []*indexPackage{
218218
{
219219
Name: pr.Platform.Package.Name,
@@ -398,7 +398,7 @@ func LoadIndex(jsonIndexFile *paths.Path) (*Index, error) {
398398
WithField("index", jsonIndexFile).
399399
WithField("signatureFile", jsonSignatureFile).
400400
WithField("trusted", trusted).Infof("Checking signature")
401-
index.IsTrusted = trusted
401+
index.isTrusted = trusted
402402
}
403403
} else {
404404
logrus.WithField("index", jsonIndexFile).Infof("Missing signature file")
@@ -423,7 +423,7 @@ func LoadIndexNoSign(jsonIndexFile *paths.Path) (*Index, error) {
423423
return nil, err
424424
}
425425

426-
index.IsTrusted = true
426+
index.isTrusted = true
427427

428428
return &index, nil
429429
}

‎arduino/cores/packageindex/index_easyjson.go‎

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎arduino/cores/packageindex/index_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ func TestIndexFromPlatformRelease(t *testing.T) {
315315
}
316316

317317
expectedIndex := Index{
318-
IsTrusted: false,
318+
isTrusted: false,
319319
Packages: []*indexPackage{{
320320
Name: "arduino",
321321
Maintainer: "Arduino",
@@ -542,7 +542,7 @@ func TestIndexFromPlatformRelease(t *testing.T) {
542542
}
543543

544544
in := IndexFromPlatformRelease(pr)
545-
require.Equal(t, expectedIndex.IsTrusted, in.IsTrusted)
545+
require.Equal(t, expectedIndex.isTrusted, in.isTrusted)
546546
require.Equal(t, len(expectedIndex.Packages), len(in.Packages))
547547

548548
for i := range expectedIndex.Packages {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /