@@ -29,7 +29,7 @@ import (
2929 "gopkg.in/yaml.v2"
3030)
3131
32- // Project represents all the
32+ // Project represents all the profiles defined for the sketch
3333type Project struct {
3434 Profiles map [string ]* Profile `yaml:"profiles"`
3535 DefaultProfile string `yaml:"default_profile"`
@@ -141,9 +141,9 @@ func (p *ProfilePlatformReference) UnmarshalYAML(unmarshal func(interface{}) err
141141 return err
142142 }
143143 if platformID , ok := data ["platform" ]; ! ok {
144- return fmt .Errorf (tr ("missing 'platform ' directive" ))
144+ return fmt .Errorf (tr ("missing '%s ' directive" , "platform " ))
145145 } 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 " ))
147147 } else if c , err := semver .Parse (platformVersion ); err != nil {
148148 return fmt .Errorf ("%s: %w" , tr ("error parsing version constraints" ), err )
149149 } else if split := strings .SplitN (platformID , ":" , 2 ); len (split ) != 2 {
@@ -157,7 +157,7 @@ func (p *ProfilePlatformReference) UnmarshalYAML(unmarshal func(interface{}) err
157157 if rawIndexURL , ok := data ["platform_index_url" ]; ok {
158158 indexURL , err := url .Parse (rawIndexURL )
159159 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 )
161161 }
162162 p .PlatformIndexURL = indexURL
163163 }
0 commit comments