Skip to content

Commit c8a3e4e

Browse files
Add comments to functions
1 parent 0d295ca commit c8a3e4e

5 files changed

+6
-0
lines changed

commands/service_profile_dump.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"github.com/arduino/go-paths-helper"
2727
)
2828

29+
// ProfileDump dumps the content of the project file.
2930
func (s *arduinoCoreServerImpl) ProfileDump(ctx context.Context, req *rpc.ProfileDumpRequest) (*rpc.ProfileDumpResponse, error) {
3031
sk, err := sketch.New(paths.New(req.GetSketchPath()))
3132
if err != nil {

commands/service_profile_init.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ import (
3030
"github.com/arduino/go-paths-helper"
3131
)
3232

33+
// InitProfile creates a new project file if it does not exist. If a profile name with the associated FQBN is specified,
34+
// it is added to the project.
3335
func (s *arduinoCoreServerImpl) InitProfile(ctx context.Context, req *rpc.InitProfileRequest) (*rpc.InitProfileResponse, error) {
3436
sketchPath := paths.New(req.GetSketchPath())
3537
projectFilePath, err := sketchPath.Join("sketch.yaml").Abs()

commands/service_profile_lib_add.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
paths "github.com/arduino/go-paths-helper"
2626
)
2727

28+
// ProfileLibAdd adds a library to the specified profile or to the default profile.
2829
func (s *arduinoCoreServerImpl) ProfileLibAdd(ctx context.Context, req *rpc.ProfileLibAddRequest) (*rpc.ProfileLibAddResponse, error) {
2930
sketchPath := paths.New(req.GetSketchPath())
3031
projectFilePath, err := sketchPath.Join("sketch.yaml").Abs()

commands/service_profile_lib_remove.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
paths "github.com/arduino/go-paths-helper"
2525
)
2626

27+
// ProfileLibRemove removes a library from the specified profile or from the default profile.
2728
func (s *arduinoCoreServerImpl) ProfileLibRemove(ctx context.Context, req *rpc.ProfileLibRemoveRequest) (*rpc.ProfileLibRemoveResponse, error) {
2829
sketchPath := paths.New(req.GetSketchPath())
2930
projectFilePath, err := sketchPath.Join("sketch.yaml").Abs()

commands/service_profile_set_default.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
paths "github.com/arduino/go-paths-helper"
2525
)
2626

27+
// ProfileSetDefault sets an existing profile as the default profile.
2728
func (s *arduinoCoreServerImpl) ProfileSetDefault(ctx context.Context, req *rpc.ProfileSetDefaultRequest) (*rpc.ProfileSetDefaultResponse, error) {
2829
if req.GetProfileName() == "" {
2930
return nil, &cmderrors.MissingProfileError{}

0 commit comments

Comments
 (0)