(sub *SubcommandData, svc string)
| 583 | } |
| 584 | |
| 585 | func generateExample(sub *SubcommandData, svc string) { |
| 586 | ex := codegen.KebabCase(svc) + " " + codegen.KebabCase(sub.Name) |
| 587 | for _, f := range sub.Flags { |
| 588 | ex += " --" + f.Name + " " + f.Example |
| 589 | } |
| 590 | sub.Example = ex |
| 591 | } |
| 592 | |
| 593 | // fieldCode generates code to initialize the data structures fields |
| 594 | // from the given args. It is used only in templates. |
no test coverage detected