Skip to content

Commit 44eb7ff

Browse files
night556JacksonTian
authored andcommitted
Fix help generating information bug
1 parent cc83926 commit 44eb7ff

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
### Master
44

5+
- fix: help generating information bug
56
- Upgrade the ossutil component to version 1.6.6
67
- Package manager switches to Go Modules
78

openapi/library.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,12 @@ func printParameters(w io.Writer, params []meta.Parameter, prefix string) {
168168
if param.Position == "Domain" {
169169
continue
170170
}
171-
if len(param.SubParameters) > 0 {
172-
printParameters(w, param.SubParameters, param.Name+".n.")
173-
//for _, sp := range param.SubParameters {
174-
// fmt.Fprintf(w," --%s.n.%s\t%s\t%s\n", param.Name, sp.Name, sp.Type, required(sp.Required))
175-
//}
176-
} else if param.Type == "RepeatList" {
177-
fmt.Fprintf(w, " --%s%s.n\t%s\t%s\t%s\n", prefix, param.Name, param.Type, required(param.Required), getDescription(param.Description))
171+
if param.Type == "RepeatList" {
172+
if len(param.SubParameters) > 0 {
173+
printParameters(w, param.SubParameters, prefix+param.Name+".n.")
174+
} else {
175+
fmt.Fprintf(w, " --%s%s.n\t%s\t%s\t%s\n", prefix, param.Name, param.Type, required(param.Required), getDescription(param.Description))
176+
}
178177
} else {
179178
fmt.Fprintf(w, " --%s%s\t%s\t%s\t%s\n", prefix, param.Name, param.Type, required(param.Required), getDescription(param.Description))
180179
}

0 commit comments

Comments
 (0)