Skip to content

Commit 7e8fd85

Browse files
committed
rename CreateSketch func to NewSketch
1 parent 3092563 commit 7e8fd85

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

cli/arguments/sketch.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ func InitSketch(path string) *paths.Path {
4848
return sketchPath
4949
}
5050

51-
// CreateSketch is a helper function useful to create a sketch instance
52-
func CreateSketch(sketchPath *paths.Path) *sketch.Sketch {
51+
// NewSketch is a helper function useful to create a sketch instance
52+
func NewSketch(sketchPath *paths.Path) *sketch.Sketch {
5353
sketch, err := sketch.New(sketchPath)
5454
if err != nil {
5555
feedback.Errorf(tr("Error creating sketch: %v"), err)

cli/compile/compile.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func runCompileCommand(cmd *cobra.Command, args []string) {
183183
}
184184

185185
if compileError == nil && uploadAfterCompile {
186-
sk := arguments.CreateSketch(sketchPath)
186+
sk := arguments.NewSketch(sketchPath)
187187
discoveryPort := arguments.GetDiscoveryPort(inst, port, sk)
188188

189189
userFieldRes, err := upload.SupportedUserFields(context.Background(), &rpc.SupportedUserFieldsRequest{

cli/debug/debug.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func runDebugCommand(command *cobra.Command, args []string) {
7676
}
7777

7878
sketchPath := arguments.InitSketch(path)
79-
sk := arguments.CreateSketch(sketchPath)
79+
sk := arguments.NewSketch(sketchPath)
8080
discoveryPort := port.GetDiscoveryPort(instance, sk)
8181

8282
debugConfigRequested := &dbg.DebugConfigRequest{

cli/upload/upload.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func runUploadCommand(command *cobra.Command, args []string) {
7878
}
7979

8080
sketchPath := arguments.InitSketch(path)
81-
sk := arguments.CreateSketch(sketchPath)
81+
sk := arguments.NewSketch(sketchPath)
8282
discoveryPort := port.GetDiscoveryPort(instance, sk)
8383

8484
if fqbn.String() == "" && sk != nil && sk.Metadata != nil {

0 commit comments

Comments
 (0)