From baacac3a36180ed27f2008bebf0048ee139c2312 Mon Sep 17 00:00:00 2001 From: Eduardo Caceres Date: Sat, 22 Sep 2018 15:36:52 +0200 Subject: [PATCH 1/2] Minor style changes in code documentation --- arduino/cores/tools.go | 2 +- builder_client_helpers/alive.go | 2 +- builder_client_helpers/boards.go | 4 ++-- builder_client_helpers/boards_v2.go | 12 +++++------ builder_client_helpers/compilations.go | 2 +- builder_client_helpers/examples.go | 2 +- builder_client_helpers/files.go | 2 +- builder_client_helpers/libraries.go | 6 +++--- builder_client_helpers/pinned_libraries.go | 12 +++++------ commands/commands.go | 2 +- commands/generatedocs/generatedocs.go | 2 +- common/formatter/README.adoc | 4 ++-- common/formatter/output/common_structs.go | 2 +- create_client_helpers/alive.go | 4 ++-- create_client_helpers/files.go | 4 ++-- create_client_helpers/sketches.go | 20 +++++++++---------- create_client_helpers/user_types.go | 2 +- .../ctags/ctags_to_prototypes.go | 2 +- .../arduino/arduino-builder/types/context.go | 2 +- .../arduino/board-discovery/README.adoc | 2 +- .../arduino/board-discovery/discovery.go | 6 +++--- .../arduino/board-discovery/serial.go | 2 +- .../github.com/dimfeld/httptreemux/group.go | 2 +- .../github.com/goadesign/goa/uuid/uuid_js.go | 4 ++-- .../golang-lru/simplelru/lru_interface.go | 2 +- vendor/github.com/oleksandr/bonjour/server.go | 2 +- vendor/github.com/sirupsen/logrus/logger.go | 6 +++--- vendor/github.com/spf13/pflag/golangflag.go | 2 +- .../serial.v1/enumerator/usb_ole_windows.go | 10 +++++----- vendor/gopkg.in/cheggaaa/pb.v1/pb.go | 2 +- .../gorethink/gorethink.v3/ql2/ql2.proto | 2 +- 31 files changed, 65 insertions(+), 65 deletions(-) diff --git a/arduino/cores/tools.go b/arduino/cores/tools.go index 69611fd3d34..10d718464ad 100644 --- a/arduino/cores/tools.go +++ b/arduino/cores/tools.go @@ -30,7 +30,7 @@ import ( // Tool represents a single Tool, part of a Package. type Tool struct { Name string `json:"name,required"` // The Name of the Tool. - Releases map[string]*ToolRelease `json:"releases"` //Maps Version to Release. + Releases map[string]*ToolRelease `json:"releases"` // Maps Version to Release. Package *Package `json:"-"` } diff --git a/builder_client_helpers/alive.go b/builder_client_helpers/alive.go index 767f16b2a44..65dee165453 100644 --- a/builder_client_helpers/alive.go +++ b/builder_client_helpers/alive.go @@ -38,7 +38,7 @@ func (c *Client) PingAlive(ctx context.Context, path string) (*http.Response, er return c.Client.Do(ctx, req) } -// NewPingAliveRequest create the request corresponding to the ping action endpoint of the alive resource. +// NewPingAliveRequest creates the request corresponding to the ping action endpoint of the alive resource. func (c *Client) NewPingAliveRequest(ctx context.Context, path string) (*http.Request, error) { scheme := c.Scheme if scheme == "" { diff --git a/builder_client_helpers/boards.go b/builder_client_helpers/boards.go index 75ceb336362..58060ee622c 100644 --- a/builder_client_helpers/boards.go +++ b/builder_client_helpers/boards.go @@ -38,7 +38,7 @@ func (c *Client) ListBoards(ctx context.Context, path string) (*http.Response, e return c.Client.Do(ctx, req) } -// NewListBoardsRequest create the request corresponding to the list action endpoint of the boards resource. +// NewListBoardsRequest creates the request corresponding to the list action endpoint of the boards resource. func (c *Client) NewListBoardsRequest(ctx context.Context, path string) (*http.Request, error) { scheme := c.Scheme if scheme == "" { @@ -69,7 +69,7 @@ func (c *Client) ShowBoards(ctx context.Context, path string) (*http.Response, e return c.Client.Do(ctx, req) } -// NewShowBoardsRequest create the request corresponding to the show action endpoint of the boards resource. +// NewShowBoardsRequest creates the request corresponding to the show action endpoint of the boards resource. func (c *Client) NewShowBoardsRequest(ctx context.Context, path string) (*http.Request, error) { scheme := c.Scheme if scheme == "" { diff --git a/builder_client_helpers/boards_v2.go b/builder_client_helpers/boards_v2.go index 957e536b701..9e889ee9194 100644 --- a/builder_client_helpers/boards_v2.go +++ b/builder_client_helpers/boards_v2.go @@ -33,7 +33,7 @@ func ByVidPidBoardsV2Path(vid string, pid string) string { return fmt.Sprintf("/builder/v2/boards/byVidPid/%s/%s", param0, param1) } -// Provides the board identified by the :vid and :pid params. Doesn't require authentication. +// ByVidPidBoardsV2 provides the board identified by the :vid and :pid params. Doesn't require authentication. func (c *Client) ByVidPidBoardsV2(ctx context.Context, path string) (*http.Response, error) { req, err := c.NewByVidPidBoardsV2Request(ctx, path) if err != nil { @@ -42,7 +42,7 @@ func (c *Client) ByVidPidBoardsV2(ctx context.Context, path string) (*http.Respo return c.Client.Do(ctx, req) } -// NewByVidPidBoardsV2Request create the request corresponding to the byVidPid action endpoint of the boards_v2 resource. +// NewByVidPidBoardsV2Request creates the request corresponding to the byVidPid action endpoint of the boards_v2 resource. func (c *Client) NewByVidPidBoardsV2Request(ctx context.Context, path string) (*http.Request, error) { scheme := c.Scheme if scheme == "" { @@ -62,7 +62,7 @@ func ListBoardsV2Path() string { return fmt.Sprintf("/builder/v2/boards") } -// Provides a list of all the boards supported by Arduino Create. Doesn't require any authentication. +// ListBoardsV2 provides a list of all the boards supported by Arduino Create. Doesn't require any authentication. func (c *Client) ListBoardsV2(ctx context.Context, path string, limit *int, offset *int) (*http.Response, error) { req, err := c.NewListBoardsV2Request(ctx, path, limit, offset) if err != nil { @@ -71,7 +71,7 @@ func (c *Client) ListBoardsV2(ctx context.Context, path string, limit *int, offs return c.Client.Do(ctx, req) } -// NewListBoardsV2Request create the request corresponding to the list action endpoint of the boards_v2 resource. +// NewListBoardsV2Request creates the request corresponding to the list action endpoint of the boards_v2 resource. func (c *Client) NewListBoardsV2Request(ctx context.Context, path string, limit *int, offset *int) (*http.Request, error) { scheme := c.Scheme if scheme == "" { @@ -102,7 +102,7 @@ func ShowBoardsV2Path(fqbn string) string { return fmt.Sprintf("/builder/v2/boards/%s", param0) } -// Provides the board identified by an fqbn. Doesn't require authentication. +// ShowBoardsV2 provides the board identified by an fqbn. Doesn't require authentication. func (c *Client) ShowBoardsV2(ctx context.Context, path string) (*http.Response, error) { req, err := c.NewShowBoardsV2Request(ctx, path) if err != nil { @@ -111,7 +111,7 @@ func (c *Client) ShowBoardsV2(ctx context.Context, path string) (*http.Response, return c.Client.Do(ctx, req) } -// NewShowBoardsV2Request create the request corresponding to the show action endpoint of the boards_v2 resource. +// NewShowBoardsV2Request creates the request corresponding to the show action endpoint of the boards_v2 resource. func (c *Client) NewShowBoardsV2Request(ctx context.Context, path string) (*http.Request, error) { scheme := c.Scheme if scheme == "" { diff --git a/builder_client_helpers/compilations.go b/builder_client_helpers/compilations.go index 3f025786160..1cda1bd5299 100644 --- a/builder_client_helpers/compilations.go +++ b/builder_client_helpers/compilations.go @@ -42,7 +42,7 @@ func (c *Client) StartCompilations(ctx context.Context, path string, payload *Co return c.Client.Do(ctx, req) } -// NewStartCompilationsRequest create the request corresponding to the start action endpoint of the compilations resource. +// NewStartCompilationsRequest creates the request corresponding to the start action endpoint of the compilations resource. func (c *Client) NewStartCompilationsRequest(ctx context.Context, path string, payload *Compilation) (*http.Request, error) { var body bytes.Buffer err := c.Encoder.Encode(payload, &body, "*/*") diff --git a/builder_client_helpers/examples.go b/builder_client_helpers/examples.go index e56a598abf3..137f297cdaf 100644 --- a/builder_client_helpers/examples.go +++ b/builder_client_helpers/examples.go @@ -38,7 +38,7 @@ func (c *Client) ListExamples(ctx context.Context, path string, maintainer *stri return c.Client.Do(ctx, req) } -// NewListExamplesRequest create the request corresponding to the list action endpoint of the examples resource. +// NewListExamplesRequest creates the request corresponding to the list action endpoint of the examples resource. func (c *Client) NewListExamplesRequest(ctx context.Context, path string, maintainer *string, libType *string) (*http.Request, error) { scheme := c.Scheme if scheme == "" { diff --git a/builder_client_helpers/files.go b/builder_client_helpers/files.go index fe6fef3cb23..f6d105b71ba 100644 --- a/builder_client_helpers/files.go +++ b/builder_client_helpers/files.go @@ -38,7 +38,7 @@ func (c *Client) ShowFiles(ctx context.Context, path string) (*http.Response, er return c.Client.Do(ctx, req) } -// NewShowFilesRequest create the request corresponding to the show action endpoint of the files resource. +// NewShowFilesRequest creates the request corresponding to the show action endpoint of the files resource. func (c *Client) NewShowFilesRequest(ctx context.Context, path string) (*http.Request, error) { scheme := c.Scheme if scheme == "" { diff --git a/builder_client_helpers/libraries.go b/builder_client_helpers/libraries.go index 73a0539c954..a6866059308 100644 --- a/builder_client_helpers/libraries.go +++ b/builder_client_helpers/libraries.go @@ -42,7 +42,7 @@ func (c *Client) ListLibraries( return c.Client.Do(ctx, req) } -// NewListLibrariesRequest create the request corresponding to the list action endpoint of the libraries resource. +// NewListLibrariesRequest creates the request corresponding to the list action endpoint of the libraries resource. func (c *Client) NewListLibrariesRequest(ctx context.Context, path string, maintainer *string, libType *string, withoutType *string) (*http.Request, error) { scheme := c.Scheme if scheme == "" { @@ -73,7 +73,7 @@ func ShowLibrariesPath(id string) string { } // ShowLibraries provides the library identified by the :id and :pid param. Doesn't require authentication. -// Also contains a list of other versions of the library +// Also contains a list of other versions of the library. func (c *Client) ShowLibraries(ctx context.Context, path string) (*http.Response, error) { req, err := c.NewShowLibrariesRequest(ctx, path) if err != nil { @@ -82,7 +82,7 @@ func (c *Client) ShowLibraries(ctx context.Context, path string) (*http.Response return c.Client.Do(ctx, req) } -// NewShowLibrariesRequest create the request corresponding to the show action endpoint of the libraries resource. +// NewShowLibrariesRequest creates the request corresponding to the show action endpoint of the libraries resource. func (c *Client) NewShowLibrariesRequest(ctx context.Context, path string) (*http.Request, error) { scheme := c.Scheme if scheme == "" { diff --git a/builder_client_helpers/pinned_libraries.go b/builder_client_helpers/pinned_libraries.go index 37ba77a0374..3360c646ea8 100644 --- a/builder_client_helpers/pinned_libraries.go +++ b/builder_client_helpers/pinned_libraries.go @@ -31,7 +31,7 @@ func AddPinnedLibrariesPath(id string) string { return fmt.Sprintf("/builder/pinned/%s", param0) } -//AddPinnedLibraries adds a new library to the list of libraries pinned by the user +// AddPinnedLibraries adds a new library to the list of libraries pinned by the user func (c *Client) AddPinnedLibraries(ctx context.Context, path string) (*http.Response, error) { req, err := c.NewAddPinnedLibrariesRequest(ctx, path) if err != nil { @@ -40,7 +40,7 @@ func (c *Client) AddPinnedLibraries(ctx context.Context, path string) (*http.Res return c.Client.Do(ctx, req) } -// NewAddPinnedLibrariesRequest create the request +// NewAddPinnedLibrariesRequest creates the request // corresponding to the add action endpoint of the pinnedLibraries resource. func (c *Client) NewAddPinnedLibrariesRequest(ctx context.Context, path string) (*http.Request, error) { scheme := c.Scheme @@ -63,7 +63,7 @@ func ListPinnedLibrariesPath() string { return fmt.Sprintf("/builder/pinned") } -//ListPinnedLibraries provides a list of all the libraries pinned by the user +// ListPinnedLibraries provides a list of all the libraries pinned by the user func (c *Client) ListPinnedLibraries(ctx context.Context, path string) (*http.Response, error) { req, err := c.NewListPinnedLibrariesRequest(ctx, path) if err != nil { @@ -72,7 +72,7 @@ func (c *Client) ListPinnedLibraries(ctx context.Context, path string) (*http.Re return c.Client.Do(ctx, req) } -// NewListPinnedLibrariesRequest create the request corresponding to the list action endpoint of the pinnedLibraries resource. +// NewListPinnedLibrariesRequest creates the request corresponding to the list action endpoint of the pinnedLibraries resource. func (c *Client) NewListPinnedLibrariesRequest(ctx context.Context, path string) (*http.Request, error) { scheme := c.Scheme if scheme == "" { @@ -96,7 +96,7 @@ func RemovePinnedLibrariesPath(id string) string { return fmt.Sprintf("/builder/pinned/%s", param0) } -//RemovePinnedLibraries removes a library to the list of libraries pinned by the user +// RemovePinnedLibraries removes a library to the list of libraries pinned by the user func (c *Client) RemovePinnedLibraries(ctx context.Context, path string) (*http.Response, error) { req, err := c.NewRemovePinnedLibrariesRequest(ctx, path) if err != nil { @@ -105,7 +105,7 @@ func (c *Client) RemovePinnedLibraries(ctx context.Context, path string) (*http. return c.Client.Do(ctx, req) } -// NewRemovePinnedLibrariesRequest create the request corresponding to the remove action endpoint of the pinnedLibraries resource. +// NewRemovePinnedLibrariesRequest creates the request corresponding to the remove action endpoint of the pinnedLibraries resource. func (c *Client) NewRemovePinnedLibrariesRequest(ctx context.Context, path string) (*http.Request, error) { scheme := c.Scheme if scheme == "" { diff --git a/commands/commands.go b/commands/commands.go index 9188bebf18f..19a8976d9b6 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -105,7 +105,7 @@ func InitPackageManager() *packagemanager.PackageManager { return pm } -// InitLibraryManager initialize the LibraryManager using the underlying packagemanager +// InitLibraryManager initializes the LibraryManager using the underlying packagemanager func InitLibraryManager(pm *packagemanager.PackageManager) *librariesmanager.LibrariesManager { logrus.Info("Starting libraries manager") lm := librariesmanager.NewLibraryManager( diff --git a/commands/generatedocs/generatedocs.go b/commands/generatedocs/generatedocs.go index 50b74727607..62f53dcd86c 100644 --- a/commands/generatedocs/generatedocs.go +++ b/commands/generatedocs/generatedocs.go @@ -65,7 +65,7 @@ func generateBashCompletions(cmd *cobra.Command, args []string) { } } -// Generate man pages for all commands and puts them in $PROJECT_DIR/docs/manpages. +// Generates man pages for all commands and puts them in $PROJECT_DIR/docs/manpages. func generateManPages(cmd *cobra.Command, args []string) { if outputDir == "" { outputDir = "docs/manpages" diff --git a/common/formatter/README.adoc b/common/formatter/README.adoc index 79251d0b1cb..080ef6f44db 100644 --- a/common/formatter/README.adoc +++ b/common/formatter/README.adoc @@ -27,11 +27,11 @@ var test TestType{ var testString = a.Format(test) fmt.Println(testString) // Prints test.String() -a.Print(test) //does the same. +a.Print(test) // Does the same. testString = b.Format(test) fmt.Println(testString) // Prints { field1 : "test", field2 : "42" } -b.Print(test) //Does the same +b.Print(test) // Does the same ---- === The default formatter diff --git a/common/formatter/output/common_structs.go b/common/formatter/output/common_structs.go index 5ec55e84861..7ba92248c77 100644 --- a/common/formatter/output/common_structs.go +++ b/common/formatter/output/common_structs.go @@ -22,7 +22,7 @@ import ( "strings" ) -//ProcessResult contains info about a completed process. +// ProcessResult contains info about a completed process. type ProcessResult struct { ItemName string `json:"name,required"` Status string `json:"status,omitempty"` diff --git a/create_client_helpers/alive.go b/create_client_helpers/alive.go index 311c57d4a0b..e5a33f2e6b7 100644 --- a/create_client_helpers/alive.go +++ b/create_client_helpers/alive.go @@ -30,7 +30,7 @@ func PingAlivePath() string { return fmt.Sprintf("/create/alive") } -// Returns 200 if the instance is healthy +// Returns 200 if the instance is healthy. func (c *Client) PingAlive(ctx context.Context, path string) (*http.Response, error) { req, err := c.NewPingAliveRequest(ctx, path) if err != nil { @@ -39,7 +39,7 @@ func (c *Client) PingAlive(ctx context.Context, path string) (*http.Response, er return c.Client.Do(ctx, req) } -// NewPingAliveRequest create the request corresponding to the ping action endpoint of the alive resource. +// NewPingAliveRequest creates the request corresponding to the ping action endpoint of the alive resource. func (c *Client) NewPingAliveRequest(ctx context.Context, path string) (*http.Request, error) { scheme := c.Scheme if scheme == "" { diff --git a/create_client_helpers/files.go b/create_client_helpers/files.go index 81d02b6a767..c895c6fc76d 100644 --- a/create_client_helpers/files.go +++ b/create_client_helpers/files.go @@ -33,7 +33,7 @@ func ShowFilesPath(fileType string, id string, name string) string { return fmt.Sprintf("/create/v1/files/%s/%s/%s", param0, param1, param2) } -// Provides the content of the file identified by :name and :id +// ShowFiles provides the content of the file identified by :name and :id. func (c *Client) ShowFiles(ctx context.Context, path string) (*http.Response, error) { req, err := c.NewShowFilesRequest(ctx, path) if err != nil { @@ -42,7 +42,7 @@ func (c *Client) ShowFiles(ctx context.Context, path string) (*http.Response, er return c.Client.Do(ctx, req) } -// NewShowFilesRequest create the request corresponding to the show action endpoint of the files resource. +// NewShowFilesRequest creates the request corresponding to the show action endpoint of the files resource. func (c *Client) NewShowFilesRequest(ctx context.Context, path string) (*http.Request, error) { scheme := c.Scheme if scheme == "" { diff --git a/create_client_helpers/sketches.go b/create_client_helpers/sketches.go index db3171fbaf1..5fdfd861859 100644 --- a/create_client_helpers/sketches.go +++ b/create_client_helpers/sketches.go @@ -36,7 +36,7 @@ const ( prod = true ) -// CreateSketches Adds a new sketch. +// CreateSketches adds a new sketch. func (c *Client) CreateSketches(ctx context.Context, path string, payload *Sketch, authorization string) (*http.Response, error) { req, err := c.NewCreateSketchesRequest(ctx, path, payload, authorization) if err != nil { @@ -45,7 +45,7 @@ func (c *Client) CreateSketches(ctx context.Context, path string, payload *Sketc return c.Client.Do(ctx, req) } -// NewCreateSketchesRequest create the request corresponding to the create action endpoint of the sketches resource. +// NewCreateSketchesRequest creates the request corresponding to the create action endpoint of the sketches resource. func (c *Client) NewCreateSketchesRequest(ctx context.Context, path string, payload *Sketch, authorization string) (*http.Request, error) { var body bytes.Buffer err := c.Encoder.Encode(payload, &body, "*/*") @@ -79,7 +79,7 @@ func DeleteSketchesPath(id string) string { return fmt.Sprintf("/create/v1/sketches/%s", id) } -// DeleteSketches Removes the sketch identified by the :id param. +// DeleteSketches removes the sketch identified by the :id param. func (c *Client) DeleteSketches(ctx context.Context, path string, authorization string) (*http.Response, error) { req, err := c.NewDeleteSketchesRequest(ctx, path, authorization) if err != nil { @@ -88,7 +88,7 @@ func (c *Client) DeleteSketches(ctx context.Context, path string, authorization return c.Client.Do(ctx, req) } -// NewDeleteSketchesRequest create the request corresponding to the delete action endpoint of the sketches resource. +// NewDeleteSketchesRequest creates the request corresponding to the delete action endpoint of the sketches resource. func (c *Client) NewDeleteSketchesRequest(ctx context.Context, path string, authorization string) (*http.Request, error) { scheme := c.Scheme if scheme == "" { @@ -118,7 +118,7 @@ func EditSketchesPath(id string) string { return fmt.Sprintf("/create/v1/sketches/%s", param0) } -// EditSketches Modifies the sketch identified by the :id param. +// EditSketches modifies the sketch identified by the :id param. // If a file has a valid data field, it will be modified too. func (c *Client) EditSketches(ctx context.Context, path string, payload *Sketch, authorization string) (*http.Response, error) { req, err := c.NewEditSketchesRequest(ctx, path, payload, authorization) @@ -128,7 +128,7 @@ func (c *Client) EditSketches(ctx context.Context, path string, payload *Sketch, return c.Client.Do(ctx, req) } -// NewEditSketchesRequest create the request corresponding to the edit action endpoint of the sketches resource. +// NewEditSketchesRequest creates the request corresponding to the edit action endpoint of the sketches resource. func (c *Client) NewEditSketchesRequest(ctx context.Context, path string, payload *Sketch, authorization string) (*http.Request, error) { var body bytes.Buffer err := c.Encoder.Encode(payload, &body, "*/*") @@ -162,7 +162,7 @@ func SearchSketchesPath() string { return fmt.Sprintf("/create/v1/sketches") } -// SearchSketches Provides a paginated list of sketches filtered according to the params. The page size is 100 items. +// SearchSketches provides a paginated list of sketches filtered according to the params. The page size is 100 items. func (c *Client) SearchSketches(ctx context.Context, path string, offset *string, owner *string, authorization *string) (*http.Response, error) { req, err := c.NewSearchSketchesRequest(ctx, path, offset, owner, authorization) if err != nil { @@ -171,7 +171,7 @@ func (c *Client) SearchSketches(ctx context.Context, path string, offset *string return c.Client.Do(ctx, req) } -// NewSearchSketchesRequest create the request corresponding to the search action endpoint of the sketches resource. +// NewSearchSketchesRequest creates the request corresponding to the search action endpoint of the sketches resource. func (c *Client) NewSearchSketchesRequest(ctx context.Context, path string, offset *string, owner *string, authorization *string) (*http.Request, error) { scheme := c.Scheme if scheme == "" { @@ -209,7 +209,7 @@ func ShowSketchesPath(id string) string { return fmt.Sprintf("/create/v1/sketches/%s", param0) } -// ShowSketches Provides the sketch identified by the :id param. +// ShowSketches provides the sketch identified by the :id param. func (c *Client) ShowSketches(ctx context.Context, path string, authorization *string) (*http.Response, error) { req, err := c.NewShowSketchesRequest(ctx, path, authorization) if err != nil { @@ -218,7 +218,7 @@ func (c *Client) ShowSketches(ctx context.Context, path string, authorization *s return c.Client.Do(ctx, req) } -// NewShowSketchesRequest create the request corresponding to the show action endpoint of the sketches resource. +// NewShowSketchesRequest creates the request corresponding to the show action endpoint of the sketches resource. func (c *Client) NewShowSketchesRequest(ctx context.Context, path string, authorization *string) (*http.Request, error) { scheme := c.Scheme if scheme == "" { diff --git a/create_client_helpers/user_types.go b/create_client_helpers/user_types.go index de99a43fff1..2dc74f54e9d 100644 --- a/create_client_helpers/user_types.go +++ b/create_client_helpers/user_types.go @@ -54,7 +54,7 @@ type Sketch struct { Types []string `form:"types,omitempty" json:"types,omitempty" xml:"types,omitempty"` } -//ConvertFrom converts from a local sketch to an Arduino Create sketch. +// ConvertFrom converts from a local sketch to an Arduino Create sketch. func ConvertFrom(sketch sketches.Sketch) *Sketch { _, inoPath := filepath.Split(sketch.Ino.Path) content, err := ioutil.ReadFile(filepath.Join(sketch.FullPath, inoPath)) diff --git a/vendor/github.com/arduino/arduino-builder/ctags/ctags_to_prototypes.go b/vendor/github.com/arduino/arduino-builder/ctags/ctags_to_prototypes.go index a1f654f96ff..b0bdbd6279d 100644 --- a/vendor/github.com/arduino/arduino-builder/ctags/ctags_to_prototypes.go +++ b/vendor/github.com/arduino/arduino-builder/ctags/ctags_to_prototypes.go @@ -112,7 +112,7 @@ func (p *CTagsParser) toPrototypes() []*types.Prototype { Prototype: tag.Prototype, Modifiers: tag.PrototypeModifiers, Line: tag.Line, - //Fields: tag, + // Fields: tag, } prototypes = append(prototypes, prototype) } diff --git a/vendor/github.com/arduino/arduino-builder/types/context.go b/vendor/github.com/arduino/arduino-builder/types/context.go index b84b9cf17a8..ea1cbec049a 100644 --- a/vendor/github.com/arduino/arduino-builder/types/context.go +++ b/vendor/github.com/arduino/arduino-builder/types/context.go @@ -79,7 +79,7 @@ type Context struct { ImportedLibraries libraries.List LibrariesResolutionResults map[string]LibraryResolutionResult IncludeFolders paths.PathList - //OutputGccMinusM string + // OutputGccMinusM string // C++ Parsing CTagsOutput string diff --git a/vendor/github.com/arduino/board-discovery/README.adoc b/vendor/github.com/arduino/board-discovery/README.adoc index b3fdecb54b6..944247f9141 100644 --- a/vendor/github.com/arduino/board-discovery/README.adoc +++ b/vendor/github.com/arduino/board-discovery/README.adoc @@ -26,7 +26,7 @@ Then start, get data and stop it when you don't need it anymore: [source, go] ---- monitor.Start() -//Get devices connected +// Get devices connected monitor.Stop() ---- You can get connected devices (via Serial or Network ports) by using the following functions: diff --git a/vendor/github.com/arduino/board-discovery/discovery.go b/vendor/github.com/arduino/board-discovery/discovery.go index ea0d2c3867e..48ac403d850 100644 --- a/vendor/github.com/arduino/board-discovery/discovery.go +++ b/vendor/github.com/arduino/board-discovery/discovery.go @@ -71,7 +71,7 @@ type SerialDevice struct { SerialNumber string `json:"serial_number"` ProductID string `json:"pid"` VendorID string `json:"vid"` - //Serial *serial.Info `json:"-"` + // Serial *serial.Info `json:"-"` } func (d SerialDevice) String() string { @@ -85,7 +85,7 @@ func (d SerialDevice) String() string { return ret } -//SerialDevices is a list of currently connected devices to the computer +// SerialDevices is a list of currently connected devices to the computer type SerialDevices map[string]*SerialDevice func (sds SerialDevices) String() string { @@ -124,7 +124,7 @@ func (d NetworkDevice) String() string { fmt.Sprintln(" PORT:", d.Port) } -//NetworkDevices is a list of currently connected devices to the computer +// NetworkDevices is a list of currently connected devices to the computer type NetworkDevices map[string]*NetworkDevice func (nds NetworkDevices) String() string { diff --git a/vendor/github.com/arduino/board-discovery/serial.go b/vendor/github.com/arduino/board-discovery/serial.go index c4baf5e5ef2..5d8853cad88 100644 --- a/vendor/github.com/arduino/board-discovery/serial.go +++ b/vendor/github.com/arduino/board-discovery/serial.go @@ -88,7 +88,7 @@ func (m *Monitor) addSerial(port *enumerator.PortDetails) { SerialNumber: port.SerialNumber, ProductID: "0x" + port.PID, VendorID: "0x" + port.VID, - //Serial: port, + // Serial: port, } for port, dev := range m.serial { if port == device.Port { diff --git a/vendor/github.com/dimfeld/httptreemux/group.go b/vendor/github.com/dimfeld/httptreemux/group.go index 7ed533e7b27..08bf32c3718 100644 --- a/vendor/github.com/dimfeld/httptreemux/group.go +++ b/vendor/github.com/dimfeld/httptreemux/group.go @@ -19,7 +19,7 @@ func (g *Group) NewGroup(path string) *Group { checkPath(path) path = g.path + path - //Don't want trailing slash as all sub-paths start with slash + // Don't want trailing slash as all sub-paths start with slash if path[len(path)-1] == '/' { path = path[:len(path)-1] } diff --git a/vendor/github.com/goadesign/goa/uuid/uuid_js.go b/vendor/github.com/goadesign/goa/uuid/uuid_js.go index 12d0cc78c26..1a0fe3212c0 100644 --- a/vendor/github.com/goadesign/goa/uuid/uuid_js.go +++ b/vendor/github.com/goadesign/goa/uuid/uuid_js.go @@ -1,7 +1,7 @@ // +build js -//This part is copied from github.com/satori/go.uuid but some feature uses non gopherjs compliants calls -//Since goa only needs a subset of the features the js copies them in here +// This part is copied from github.com/satori/go.uuid but some feature uses non gopherjs compliants calls +// Since goa only needs a subset of the features the js copies them in here package uuid diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go index 744cac01c63..e5f1d169a43 100644 --- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go @@ -11,7 +11,7 @@ type LRUCache interface { // updates the "recently used"-ness of the key. #value, isFound Get(key interface{}) (value interface{}, ok bool) - // Check if a key exsists in cache without updating the recent-ness. + // Checks if a key exists in cache without updating the recent-ness. Contains(key interface{}) (ok bool) // Returns key's value without updating the "recently used"-ness of the key. diff --git a/vendor/github.com/oleksandr/bonjour/server.go b/vendor/github.com/oleksandr/bonjour/server.go index 66e2a00d488..1e2c780210b 100644 --- a/vendor/github.com/oleksandr/bonjour/server.go +++ b/vendor/github.com/oleksandr/bonjour/server.go @@ -510,7 +510,7 @@ func (s *Server) serviceTypeName(resp *dns.Msg, ttl uint32) { } // Perform probing & announcement -//TODO: implement a proper probing & conflict resolution +// TODO: implement a proper probing & conflict resolution func (s *Server) probe() { q := new(dns.Msg) q.SetQuestion(s.service.ServiceInstanceName(), dns.TypePTR) diff --git a/vendor/github.com/sirupsen/logrus/logger.go b/vendor/github.com/sirupsen/logrus/logger.go index fdaf8a65341..1043c4c58e2 100644 --- a/vendor/github.com/sirupsen/logrus/logger.go +++ b/vendor/github.com/sirupsen/logrus/logger.go @@ -301,9 +301,9 @@ func (logger *Logger) Panicln(args ...interface{}) { } } -//When file is opened with appending mode, it's safe to -//write concurrently to a file (within 4k message on Linux). -//In these cases user can choose to disable the lock. +// When file is opened with appending mode, it's safe to +// write concurrently to a file (within 4k message on Linux). +// In these cases user can choose to disable the lock. func (logger *Logger) SetNoLock() { logger.mu.Disable() } diff --git a/vendor/github.com/spf13/pflag/golangflag.go b/vendor/github.com/spf13/pflag/golangflag.go index d3dd72b7fee..3e47328bfa9 100644 --- a/vendor/github.com/spf13/pflag/golangflag.go +++ b/vendor/github.com/spf13/pflag/golangflag.go @@ -68,7 +68,7 @@ func PFlagFromGoFlag(goflag *goflag.Flag) *Flag { Usage: goflag.Usage, Value: wrapFlagValue(goflag.Value), // Looks like golang flags don't set DefValue correctly :-( - //DefValue: goflag.DefValue, + // DefValue: goflag.DefValue, DefValue: goflag.Value.String(), } // Ex: if the golang flag was -v, allow both -v and --v to work diff --git a/vendor/go.bug.st/serial.v1/enumerator/usb_ole_windows.go b/vendor/go.bug.st/serial.v1/enumerator/usb_ole_windows.go index bbc04355477..0311e80187b 100644 --- a/vendor/go.bug.st/serial.v1/enumerator/usb_ole_windows.go +++ b/vendor/go.bug.st/serial.v1/enumerator/usb_ole_windows.go @@ -92,11 +92,11 @@ func getPortDetails(item *ole.IDispatch, res *PortDetails) error { } res.Name = re[0][1] - //itemPnPDeviceID, err := item.GetProperty("PnPDeviceID") - //if err != nil { - // return err - //} - //PnPDeviceID := itemPnPDeviceID.ToString() + // itemPnPDeviceID, err := item.GetProperty("PnPDeviceID") + // if err != nil { + // return err + // } + // PnPDeviceID := itemPnPDeviceID.ToString() itemDeviceID, err := item.GetProperty("DeviceID") if err != nil { diff --git a/vendor/gopkg.in/cheggaaa/pb.v1/pb.go b/vendor/gopkg.in/cheggaaa/pb.v1/pb.go index eb730f54d24..91f007408b5 100644 --- a/vendor/gopkg.in/cheggaaa/pb.v1/pb.go +++ b/vendor/gopkg.in/cheggaaa/pb.v1/pb.go @@ -229,7 +229,7 @@ func (pb *ProgressBar) SetWidth(width int) *ProgressBar { // End print func (pb *ProgressBar) Finish() { - //Protect multiple calls + // Protect multiple calls pb.finishOnce.Do(func() { close(pb.finish) pb.write(atomic.LoadInt64(&pb.Total), atomic.LoadInt64(&pb.current)) diff --git a/vendor/gopkg.in/gorethink/gorethink.v3/ql2/ql2.proto b/vendor/gopkg.in/gorethink/gorethink.v3/ql2/ql2.proto index e40c5be56f9..d688202eb4a 100644 --- a/vendor/gopkg.in/gorethink/gorethink.v3/ql2/ql2.proto +++ b/vendor/gopkg.in/gorethink/gorethink.v3/ql2/ql2.proto @@ -362,7 +362,7 @@ message Term { APPEND = 29; // ARRAY, DATUM -> ARRAY // Prepend a single element to the end of an array (like `cons`). PREPEND = 80; // ARRAY, DATUM -> ARRAY - //Remove the elements of one array from another array. + // Remove the elements of one array from another array. DIFFERENCE = 95; // ARRAY, ARRAY -> ARRAY // DATUM Set Ops From 8e057d4cab560a2659863d582c18e8af68ba4727 Mon Sep 17 00:00:00 2001 From: Eduardo Caceres Date: Mon, 24 Sep 2018 20:37:59 +0200 Subject: [PATCH 2/2] Undo changes in vendor/ files --- .../arduino-builder/ctags/ctags_to_prototypes.go | 2 +- .../arduino/arduino-builder/types/context.go | 2 +- vendor/github.com/arduino/board-discovery/README.adoc | 2 +- vendor/github.com/arduino/board-discovery/discovery.go | 6 +++--- vendor/github.com/arduino/board-discovery/serial.go | 2 +- vendor/github.com/dimfeld/httptreemux/group.go | 2 +- vendor/github.com/goadesign/goa/uuid/uuid_js.go | 4 ++-- .../hashicorp/golang-lru/simplelru/lru_interface.go | 2 +- vendor/github.com/oleksandr/bonjour/server.go | 2 +- vendor/github.com/sirupsen/logrus/logger.go | 6 +++--- vendor/github.com/spf13/pflag/golangflag.go | 2 +- .../go.bug.st/serial.v1/enumerator/usb_ole_windows.go | 10 +++++----- vendor/gopkg.in/cheggaaa/pb.v1/pb.go | 2 +- vendor/gopkg.in/gorethink/gorethink.v3/ql2/ql2.proto | 2 +- 14 files changed, 23 insertions(+), 23 deletions(-) diff --git a/vendor/github.com/arduino/arduino-builder/ctags/ctags_to_prototypes.go b/vendor/github.com/arduino/arduino-builder/ctags/ctags_to_prototypes.go index b0bdbd6279d..a1f654f96ff 100644 --- a/vendor/github.com/arduino/arduino-builder/ctags/ctags_to_prototypes.go +++ b/vendor/github.com/arduino/arduino-builder/ctags/ctags_to_prototypes.go @@ -112,7 +112,7 @@ func (p *CTagsParser) toPrototypes() []*types.Prototype { Prototype: tag.Prototype, Modifiers: tag.PrototypeModifiers, Line: tag.Line, - // Fields: tag, + //Fields: tag, } prototypes = append(prototypes, prototype) } diff --git a/vendor/github.com/arduino/arduino-builder/types/context.go b/vendor/github.com/arduino/arduino-builder/types/context.go index ea1cbec049a..b84b9cf17a8 100644 --- a/vendor/github.com/arduino/arduino-builder/types/context.go +++ b/vendor/github.com/arduino/arduino-builder/types/context.go @@ -79,7 +79,7 @@ type Context struct { ImportedLibraries libraries.List LibrariesResolutionResults map[string]LibraryResolutionResult IncludeFolders paths.PathList - // OutputGccMinusM string + //OutputGccMinusM string // C++ Parsing CTagsOutput string diff --git a/vendor/github.com/arduino/board-discovery/README.adoc b/vendor/github.com/arduino/board-discovery/README.adoc index 944247f9141..b3fdecb54b6 100644 --- a/vendor/github.com/arduino/board-discovery/README.adoc +++ b/vendor/github.com/arduino/board-discovery/README.adoc @@ -26,7 +26,7 @@ Then start, get data and stop it when you don't need it anymore: [source, go] ---- monitor.Start() -// Get devices connected +//Get devices connected monitor.Stop() ---- You can get connected devices (via Serial or Network ports) by using the following functions: diff --git a/vendor/github.com/arduino/board-discovery/discovery.go b/vendor/github.com/arduino/board-discovery/discovery.go index 48ac403d850..ea0d2c3867e 100644 --- a/vendor/github.com/arduino/board-discovery/discovery.go +++ b/vendor/github.com/arduino/board-discovery/discovery.go @@ -71,7 +71,7 @@ type SerialDevice struct { SerialNumber string `json:"serial_number"` ProductID string `json:"pid"` VendorID string `json:"vid"` - // Serial *serial.Info `json:"-"` + //Serial *serial.Info `json:"-"` } func (d SerialDevice) String() string { @@ -85,7 +85,7 @@ func (d SerialDevice) String() string { return ret } -// SerialDevices is a list of currently connected devices to the computer +//SerialDevices is a list of currently connected devices to the computer type SerialDevices map[string]*SerialDevice func (sds SerialDevices) String() string { @@ -124,7 +124,7 @@ func (d NetworkDevice) String() string { fmt.Sprintln(" PORT:", d.Port) } -// NetworkDevices is a list of currently connected devices to the computer +//NetworkDevices is a list of currently connected devices to the computer type NetworkDevices map[string]*NetworkDevice func (nds NetworkDevices) String() string { diff --git a/vendor/github.com/arduino/board-discovery/serial.go b/vendor/github.com/arduino/board-discovery/serial.go index 5d8853cad88..c4baf5e5ef2 100644 --- a/vendor/github.com/arduino/board-discovery/serial.go +++ b/vendor/github.com/arduino/board-discovery/serial.go @@ -88,7 +88,7 @@ func (m *Monitor) addSerial(port *enumerator.PortDetails) { SerialNumber: port.SerialNumber, ProductID: "0x" + port.PID, VendorID: "0x" + port.VID, - // Serial: port, + //Serial: port, } for port, dev := range m.serial { if port == device.Port { diff --git a/vendor/github.com/dimfeld/httptreemux/group.go b/vendor/github.com/dimfeld/httptreemux/group.go index 08bf32c3718..7ed533e7b27 100644 --- a/vendor/github.com/dimfeld/httptreemux/group.go +++ b/vendor/github.com/dimfeld/httptreemux/group.go @@ -19,7 +19,7 @@ func (g *Group) NewGroup(path string) *Group { checkPath(path) path = g.path + path - // Don't want trailing slash as all sub-paths start with slash + //Don't want trailing slash as all sub-paths start with slash if path[len(path)-1] == '/' { path = path[:len(path)-1] } diff --git a/vendor/github.com/goadesign/goa/uuid/uuid_js.go b/vendor/github.com/goadesign/goa/uuid/uuid_js.go index 1a0fe3212c0..12d0cc78c26 100644 --- a/vendor/github.com/goadesign/goa/uuid/uuid_js.go +++ b/vendor/github.com/goadesign/goa/uuid/uuid_js.go @@ -1,7 +1,7 @@ // +build js -// This part is copied from github.com/satori/go.uuid but some feature uses non gopherjs compliants calls -// Since goa only needs a subset of the features the js copies them in here +//This part is copied from github.com/satori/go.uuid but some feature uses non gopherjs compliants calls +//Since goa only needs a subset of the features the js copies them in here package uuid diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go index e5f1d169a43..744cac01c63 100644 --- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go @@ -11,7 +11,7 @@ type LRUCache interface { // updates the "recently used"-ness of the key. #value, isFound Get(key interface{}) (value interface{}, ok bool) - // Checks if a key exists in cache without updating the recent-ness. + // Check if a key exsists in cache without updating the recent-ness. Contains(key interface{}) (ok bool) // Returns key's value without updating the "recently used"-ness of the key. diff --git a/vendor/github.com/oleksandr/bonjour/server.go b/vendor/github.com/oleksandr/bonjour/server.go index 1e2c780210b..66e2a00d488 100644 --- a/vendor/github.com/oleksandr/bonjour/server.go +++ b/vendor/github.com/oleksandr/bonjour/server.go @@ -510,7 +510,7 @@ func (s *Server) serviceTypeName(resp *dns.Msg, ttl uint32) { } // Perform probing & announcement -// TODO: implement a proper probing & conflict resolution +//TODO: implement a proper probing & conflict resolution func (s *Server) probe() { q := new(dns.Msg) q.SetQuestion(s.service.ServiceInstanceName(), dns.TypePTR) diff --git a/vendor/github.com/sirupsen/logrus/logger.go b/vendor/github.com/sirupsen/logrus/logger.go index 1043c4c58e2..fdaf8a65341 100644 --- a/vendor/github.com/sirupsen/logrus/logger.go +++ b/vendor/github.com/sirupsen/logrus/logger.go @@ -301,9 +301,9 @@ func (logger *Logger) Panicln(args ...interface{}) { } } -// When file is opened with appending mode, it's safe to -// write concurrently to a file (within 4k message on Linux). -// In these cases user can choose to disable the lock. +//When file is opened with appending mode, it's safe to +//write concurrently to a file (within 4k message on Linux). +//In these cases user can choose to disable the lock. func (logger *Logger) SetNoLock() { logger.mu.Disable() } diff --git a/vendor/github.com/spf13/pflag/golangflag.go b/vendor/github.com/spf13/pflag/golangflag.go index 3e47328bfa9..d3dd72b7fee 100644 --- a/vendor/github.com/spf13/pflag/golangflag.go +++ b/vendor/github.com/spf13/pflag/golangflag.go @@ -68,7 +68,7 @@ func PFlagFromGoFlag(goflag *goflag.Flag) *Flag { Usage: goflag.Usage, Value: wrapFlagValue(goflag.Value), // Looks like golang flags don't set DefValue correctly :-( - // DefValue: goflag.DefValue, + //DefValue: goflag.DefValue, DefValue: goflag.Value.String(), } // Ex: if the golang flag was -v, allow both -v and --v to work diff --git a/vendor/go.bug.st/serial.v1/enumerator/usb_ole_windows.go b/vendor/go.bug.st/serial.v1/enumerator/usb_ole_windows.go index 0311e80187b..bbc04355477 100644 --- a/vendor/go.bug.st/serial.v1/enumerator/usb_ole_windows.go +++ b/vendor/go.bug.st/serial.v1/enumerator/usb_ole_windows.go @@ -92,11 +92,11 @@ func getPortDetails(item *ole.IDispatch, res *PortDetails) error { } res.Name = re[0][1] - // itemPnPDeviceID, err := item.GetProperty("PnPDeviceID") - // if err != nil { - // return err - // } - // PnPDeviceID := itemPnPDeviceID.ToString() + //itemPnPDeviceID, err := item.GetProperty("PnPDeviceID") + //if err != nil { + // return err + //} + //PnPDeviceID := itemPnPDeviceID.ToString() itemDeviceID, err := item.GetProperty("DeviceID") if err != nil { diff --git a/vendor/gopkg.in/cheggaaa/pb.v1/pb.go b/vendor/gopkg.in/cheggaaa/pb.v1/pb.go index 91f007408b5..eb730f54d24 100644 --- a/vendor/gopkg.in/cheggaaa/pb.v1/pb.go +++ b/vendor/gopkg.in/cheggaaa/pb.v1/pb.go @@ -229,7 +229,7 @@ func (pb *ProgressBar) SetWidth(width int) *ProgressBar { // End print func (pb *ProgressBar) Finish() { - // Protect multiple calls + //Protect multiple calls pb.finishOnce.Do(func() { close(pb.finish) pb.write(atomic.LoadInt64(&pb.Total), atomic.LoadInt64(&pb.current)) diff --git a/vendor/gopkg.in/gorethink/gorethink.v3/ql2/ql2.proto b/vendor/gopkg.in/gorethink/gorethink.v3/ql2/ql2.proto index d688202eb4a..e40c5be56f9 100644 --- a/vendor/gopkg.in/gorethink/gorethink.v3/ql2/ql2.proto +++ b/vendor/gopkg.in/gorethink/gorethink.v3/ql2/ql2.proto @@ -362,7 +362,7 @@ message Term { APPEND = 29; // ARRAY, DATUM -> ARRAY // Prepend a single element to the end of an array (like `cons`). PREPEND = 80; // ARRAY, DATUM -> ARRAY - // Remove the elements of one array from another array. + //Remove the elements of one array from another array. DIFFERENCE = 95; // ARRAY, ARRAY -> ARRAY // DATUM Set Ops