@@ -48,13 +48,13 @@ func FindProjects() ([]Type, error) {
48
48
return foundProjects , nil
49
49
}
50
50
51
- return nil , fmt .Errorf ("specified path %s is not an Arduino project" , targetPath . String () )
51
+ return nil , fmt .Errorf ("specified path %s is not an Arduino project" , targetPath )
52
52
}
53
53
54
54
foundProjects = append (foundProjects , findProjectsUnderPath (targetPath , superprojectTypeFilter , recursive )... )
55
55
56
56
if foundProjects == nil {
57
- return nil , fmt .Errorf ("no projects found under %s" , targetPath . String () )
57
+ return nil , fmt .Errorf ("no projects found under %s" , targetPath )
58
58
}
59
59
60
60
return foundProjects , nil
@@ -66,7 +66,7 @@ func findProjectsUnderPath(targetPath *paths.Path, projectType projecttype.Type,
66
66
67
67
isProject , foundProjectType := isProject (targetPath , projectType )
68
68
if isProject {
69
- logrus .Tracef ("%s is %s" , targetPath . String () , projectType . String () )
69
+ logrus .Tracef ("%s is %s" , targetPath , projectType )
70
70
foundProject := Type {
71
71
Path : targetPath ,
72
72
ProjectType : foundProjectType ,
@@ -132,40 +132,40 @@ func findSubprojects(superproject Type, apexSuperprojectType projecttype.Type) [
132
132
133
133
// isProject determines if a path contains an Arduino project, and if so which type.
134
134
func isProject (potentialProjectPath * paths.Path , projectType projecttype.Type ) (bool , projecttype.Type ) {
135
- logrus .Tracef ("Checking if %s is %s" , potentialProjectPath . String () , projectType . String () )
135
+ logrus .Tracef ("Checking if %s is %s" , potentialProjectPath , projectType )
136
136
if (projectType == projecttype .All || projectType == projecttype .Sketch ) && isSketch (potentialProjectPath ) {
137
- logrus .Tracef ("%s is %s" , potentialProjectPath . String () , projecttype .Sketch . String () )
137
+ logrus .Tracef ("%s is %s" , potentialProjectPath , projecttype .Sketch )
138
138
return true , projecttype .Sketch
139
139
} else if (projectType == projecttype .All || projectType == projecttype .Library ) && isLibrary (potentialProjectPath ) {
140
- logrus .Tracef ("%s is %s" , potentialProjectPath . String () , projecttype .Library . String () )
140
+ logrus .Tracef ("%s is %s" , potentialProjectPath , projecttype .Library )
141
141
return true , projecttype .Library
142
142
} else if (projectType == projecttype .All || projectType == projecttype .Platform ) && isPlatform (potentialProjectPath ) {
143
- logrus .Tracef ("%s is %s" , potentialProjectPath . String () , projecttype .Platform . String () )
143
+ logrus .Tracef ("%s is %s" , potentialProjectPath , projecttype .Platform )
144
144
return true , projecttype .Platform
145
145
} else if (projectType == projecttype .All || projectType == projecttype .PackageIndex ) && isPackageIndex (potentialProjectPath ) {
146
- logrus .Tracef ("%s is %s" , potentialProjectPath . String () , projecttype .PackageIndex . String () )
146
+ logrus .Tracef ("%s is %s" , potentialProjectPath , projecttype .PackageIndex )
147
147
return true , projecttype .PackageIndex
148
148
}
149
149
return false , projecttype .Not
150
150
}
151
151
152
152
// isProject determines if a file is the indicator file for an Arduino project, and if so which type.
153
153
func isProjectIndicatorFile (potentialProjectFilePath * paths.Path , projectType projecttype.Type ) (bool , projecttype.Type ) {
154
- logrus .Tracef ("Checking if %s is %s indicator file" , potentialProjectFilePath . String () , projectType . String () )
154
+ logrus .Tracef ("Checking if %s is %s indicator file" , potentialProjectFilePath , projectType )
155
155
if (projectType == projecttype .All || projectType == projecttype .Sketch ) && isSketchIndicatorFile (potentialProjectFilePath ) {
156
- logrus .Tracef ("%s is %s indicator file" , potentialProjectFilePath . String () , projecttype .Sketch . String () )
156
+ logrus .Tracef ("%s is %s indicator file" , potentialProjectFilePath , projecttype .Sketch )
157
157
return true , projecttype .Sketch
158
158
} else if (projectType == projecttype .All || projectType == projecttype .Library ) && isLibraryIndicatorFile (potentialProjectFilePath ) {
159
- logrus .Tracef ("%s is %s indicator file" , potentialProjectFilePath . String () , projecttype .Library . String () )
159
+ logrus .Tracef ("%s is %s indicator file" , potentialProjectFilePath , projecttype .Library )
160
160
return true , projecttype .Library
161
161
} else if (projectType == projecttype .All || projectType == projecttype .Platform ) && isPlatformIndicatorFile (potentialProjectFilePath ) {
162
- logrus .Tracef ("%s is %s indicator file" , potentialProjectFilePath . String () , projecttype .Platform . String () )
162
+ logrus .Tracef ("%s is %s indicator file" , potentialProjectFilePath , projecttype .Platform )
163
163
return true , projecttype .Platform
164
164
} else if (projectType == projecttype .All || projectType == projecttype .PackageIndex ) && isPackageIndexIndicatorFile (potentialProjectFilePath ) {
165
- logrus .Tracef ("%s is %s indicator file" , potentialProjectFilePath . String () , projecttype .PackageIndex . String () )
165
+ logrus .Tracef ("%s is %s indicator file" , potentialProjectFilePath , projecttype .PackageIndex )
166
166
return true , projecttype .PackageIndex
167
167
}
168
- logrus .Tracef ("%s is not indicator file" , potentialProjectFilePath . String () )
168
+ logrus .Tracef ("%s is not indicator file" , potentialProjectFilePath )
169
169
return false , projecttype .Not
170
170
}
171
171
0 commit comments