(str string)
| 337 | } |
| 338 | |
| 339 | func getIndentationString(str string) string { |
| 340 | if str == "tabs" { |
| 341 | return "\t"; |
| 342 | } |
| 343 | index := strings.Index(str, "spaces"); |
| 344 | if (index < 1) { |
| 345 | log.Printf ("invalid indentation: \"%s\". Using \"tabs\" instead\n", str); |
| 346 | return "\t"; |
| 347 | } |
| 348 | numSpaces, err := strconv.ParseUint(str[0:index], 10, 64); |
| 349 | if err!=nil { |
| 350 | log.Printf ("invalid indentation: \"%s\". Using \"4spaces\" instead\n", str); |
| 351 | return " "; |
| 352 | } |
| 353 | indentString := ""; |
| 354 | var i uint64; |
| 355 | for i < numSpaces { |
| 356 | indentString = indentString + " "; |
| 357 | i++; |
| 358 | } |
| 359 | return indentString; |
| 360 | } |
| 361 | |
| 362 | func (component *ComponentDefinition) checkImplementations() error { |
| 363 | implementations := component.ImplementationList.Implementations |
no test coverage detected