-
-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a05fa12
commit 70a018f
Showing
4 changed files
with
105 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package builder | ||
|
||
import rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" | ||
|
||
// ExecutableSectionSize represents a section of the executable output file | ||
type ExecutableSectionSize struct { | ||
Name string `json:"name"` | ||
Size int `json:"size"` | ||
MaxSize int `json:"max_size"` | ||
} | ||
|
||
// ExecutablesFileSections is an array of ExecutablesFileSection | ||
type ExecutablesFileSections []ExecutableSectionSize | ||
|
||
// ToRPCExecutableSectionSizeArray transforms this array into a []*rpc.ExecutableSectionSize | ||
func (s ExecutablesFileSections) ToRPCExecutableSectionSizeArray() []*rpc.ExecutableSectionSize { | ||
res := []*rpc.ExecutableSectionSize{} | ||
for _, section := range s { | ||
res = append(res, &rpc.ExecutableSectionSize{ | ||
Name: section.Name, | ||
Size: int64(section.Size), | ||
MaxSize: int64(section.MaxSize), | ||
}) | ||
} | ||
return res | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters