Skip to content

Commit

Permalink
More updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshaw committed Dec 22, 2024
1 parent 615d7f3 commit 2224cd8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion _examples/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,16 @@ func (cmd *command) parse(ctx context.Context) error {
switch typ {
case sectNone:
case sectUsage:
spec, _, _ := strings.Cut(strings.TrimSpace(s), "\n")
spec, extra, _ := strings.Cut(strings.TrimSpace(s), "\n")
spec = strings.TrimSpace(strings.TrimPrefix(spec, cmd.String()))
logger(" spec: %q", spec)
cmd.spec = spec
if extra = strings.TrimSpace(extra); extra != "" {
switch cmd.app {
case "docker":
cmd.banner = extra
}
}
case sectAliases:
for _, str := range strings.Split(strings.TrimSpace(s), ",") {
if str = strings.TrimSpace(strings.TrimPrefix(str, cmd.String())); str != "" {
Expand Down

0 comments on commit 2224cd8

Please sign in to comment.