File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 22
33### Master
44
5+ - fix: fix ` --pager ` error
6+ - add: product sae
7+
58### 3.0.22
69
710- update: API meta data
Original file line number Diff line number Diff line change @@ -109,19 +109,16 @@ func (a *Pager) GetResponseCollection() string {
109109 root := make (map [string ]interface {})
110110 current := make (map [string ]interface {})
111111 path := a .collectionPath
112-
113- for {
114- l := strings .Index (path , "." )
115- tempSlice := strings .Split (path , "." )
116- if l > 0 {
117- tempSlice = tempSlice [len (tempSlice )- 2 :]
118- root [tempSlice [0 ]] = current
119- }
120- key := strings .TrimSuffix (tempSlice [len (tempSlice )- 1 ], "[]" )
121- current [key ] = a .results
122- break
123-
112+ l := strings .Index (path , "." )
113+ tempSlice := strings .Split (path , "." )
114+ if l > 0 {
115+ tempSlice = tempSlice [len (tempSlice )- 2 :]
116+ root [tempSlice [0 ]] = current
117+ } else {
118+ root = current
124119 }
120+ key := strings .TrimSuffix (tempSlice [len (tempSlice )- 1 ], "[]" )
121+ current [key ] = a .results
125122
126123 s , err := json .Marshal (root )
127124 if err != nil {
You can’t perform that action at this time.
0 commit comments