Skip to content

Fixed wrong capitalization in JSON output for 'lib' related commands #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions arduino/libraries/librariesindex/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,34 @@ import (

"github.com/arduino/arduino-cli/arduino/libraries"
"github.com/arduino/arduino-cli/arduino/resources"
"go.bug.st/relaxed-semver"
semver "go.bug.st/relaxed-semver"
)

// Index represents the list of libraries available for download
type Index struct {
Libraries map[string]*Library
Libraries map[string]*Library `json:"libraries"`
}

// Library is a library available for download
type Library struct {
Name string
Releases map[string]*Release
Latest *Release `json:"-"`
Index *Index `json:"-"`
Name string `json:"name"`
Releases map[string]*Release `json:"releases"`
Latest *Release `json:"-"`
Index *Index `json:"-"`
}

// Release is a release of a library available for download
type Release struct {
Author string
Version *semver.Version
Maintainer string
Sentence string
Paragraph string
Website string
Category string
Architectures []string
Types []string
Resource *resources.DownloadResource
Author string `json:"author"`
Version *semver.Version `json:"version"`
Maintainer string `json:"maintainer"`
Sentence string `json:"sentence"`
Paragraph string `json:"paragraph"`
Website string `json:"website"`
Category string `json:"category"`
Architectures []string `json:"architectures"`
Types []string `json:"types"`
Resource *resources.DownloadResource `json:"resource"`

Library *Library `json:"-"`
}
Expand Down
10 changes: 5 additions & 5 deletions arduino/resources/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ package resources

// DownloadResource has all the information to download a file
type DownloadResource struct {
URL string
ArchiveFileName string
Checksum string
Size int64
CachePath string
URL string `json:"url"`
ArchiveFileName string `json:"archiveFileName"`
Checksum string `json:"checksum"`
Size int64 `json:"size"`
CachePath string `json:"cachePath"`
}

// DownloadResult contains the result of a download
Expand Down