buildParamDescription(params) returns a default entity description for `$ wsk [ENTITY] get [ENTITY_NAME] --summary` when parameters are defined, but the entity description under annotations is not.
(params string)
| 466 | // `$ wsk [ENTITY] get [ENTITY_NAME] --summary` when parameters are defined, |
| 467 | // but the entity description under annotations is not. |
| 468 | func buildParamDescription(params string) string { |
| 469 | preamble := "Returns a result based on parameter" |
| 470 | params = strings.Replace(params, "*", "", -1) |
| 471 | temp := strings.Split(params, ",") |
| 472 | if len(temp) > 1 { |
| 473 | lastParam := temp[len(temp)-1] |
| 474 | newParams := strings.Replace(params, fmt.Sprintf(",%s", lastParam), fmt.Sprintf(" and%s", lastParam), 1) |
| 475 | return fmt.Sprintf("%ss %s", preamble, newParams) |
| 476 | } |
| 477 | return fmt.Sprintf("%s %s", preamble, params) |
| 478 | } |
| 479 | |
| 480 | func getFullName(namespace string, packageName string, entityName string) string { |
| 481 | var fullName string |
no outgoing calls
no test coverage detected