(opts *InstallOptions)
| 586 | } |
| 587 | |
| 588 | func parseSkillFromOpts(opts *InstallOptions) { |
| 589 | if opts.SkillName != "" { |
| 590 | if name, version, ok := cutLast(opts.SkillName, "@"); ok && name != "" { |
| 591 | opts.version = version |
| 592 | opts.SkillName = name |
| 593 | return |
| 594 | } |
| 595 | } |
| 596 | if opts.Pin != "" { |
| 597 | opts.version = opts.Pin |
| 598 | } |
| 599 | } |
| 600 | |
| 601 | // cutLast splits s around the last occurrence of sep, |
| 602 | // returning the text before and after sep, and whether sep was found. |