File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ func getAvailableCollections(vdbName string) ([]string, error) {
211211
212212 for _ , line := range lines {
213213 line = strings .TrimSpace (line )
214- if line != "" && ! strings .HasPrefix (line , "Found" ) && ! strings .HasPrefix (line , "Collections" ) {
214+ if line != "" && line != "[" && line != "]" && ! strings .HasPrefix (line , "Found" ) && ! strings .HasPrefix (line , "Collections" ) {
215215 // Extract collection name from the line
216216 // Assuming format like "1. collection_name" or just "collection_name"
217217 if strings .Contains (line , ". " ) {
@@ -220,7 +220,7 @@ func getAvailableCollections(vdbName string) ([]string, error) {
220220 collections = append (collections , strings .TrimSpace (parts [1 ]))
221221 }
222222 } else {
223- collections = append (collections , line )
223+ collections = append (collections , strings . Trim ( line , " \" " ) )
224224 }
225225 }
226226 }
Original file line number Diff line number Diff line change @@ -105,14 +105,14 @@ func showStatus(vdbName string) error {
105105 var collections []string
106106 for _ , line := range lines {
107107 line = strings .TrimSpace (line )
108- if line != "" && ! strings .HasPrefix (line , "Found" ) && ! strings .HasPrefix (line , "Collections" ) {
108+ if line != "" && line != "[" && line != "]" && ! strings .HasPrefix (line , "Found" ) && ! strings .HasPrefix (line , "Collections" ) {
109109 if strings .Contains (line , ". " ) {
110110 parts := strings .SplitN (line , ". " , 2 )
111111 if len (parts ) > 1 {
112112 collections = append (collections , strings .TrimSpace (parts [1 ]))
113113 }
114114 } else {
115- collections = append (collections , line )
115+ collections = append (collections , strings . Trim ( line , " \" " ) )
116116 }
117117 }
118118 }
You can’t perform that action at this time.
0 commit comments