@@ -29,7 +29,7 @@ import (
29
29
"gopkg.in/yaml.v2"
30
30
)
31
31
32
- // Project represents all the
32
+ // Project represents all the profiles defined for the sketch
33
33
type Project struct {
34
34
Profiles map [string ]* Profile `yaml:"profiles"`
35
35
DefaultProfile string `yaml:"default_profile"`
@@ -141,9 +141,9 @@ func (p *ProfilePlatformReference) UnmarshalYAML(unmarshal func(interface{}) err
141
141
return err
142
142
}
143
143
if platformID , ok := data ["platform" ]; ! ok {
144
- return fmt .Errorf (tr ("missing 'platform ' directive" ))
144
+ return fmt .Errorf (tr ("missing '%s ' directive" , "platform " ))
145
145
} else if platformID , platformVersion , ok := parseNameAndVersion (platformID ); ! ok {
146
- return fmt .Errorf (tr ("invalid 'platform ' directive" ))
146
+ return fmt .Errorf (tr ("invalid '%s ' directive" , "platform " ))
147
147
} else if c , err := semver .Parse (platformVersion ); err != nil {
148
148
return fmt .Errorf ("%s: %w" , tr ("error parsing version constraints" ), err )
149
149
} else if split := strings .SplitN (platformID , ":" , 2 ); len (split ) != 2 {
@@ -157,7 +157,7 @@ func (p *ProfilePlatformReference) UnmarshalYAML(unmarshal func(interface{}) err
157
157
if rawIndexURL , ok := data ["platform_index_url" ]; ok {
158
158
indexURL , err := url .Parse (rawIndexURL )
159
159
if err != nil {
160
- return fmt .Errorf ("%s: %w" , tr ("invlid platform index URL:" ), err )
160
+ return fmt .Errorf ("%s: %w" , tr ("invalid platform index URL:" ), err )
161
161
}
162
162
p .PlatformIndexURL = indexURL
163
163
}
0 commit comments