Answer the question
In order to leave comments, you need to log in
How to parse the structure?
There is a structure in the db package. Using the Read() method, I write data to it (link1 and link2):
type Images struct {
Original string
Crop string
}
images := db.Read()
Вывожу и получаю:
&[{link1 link2}]
Answer the question
In order to leave comments, you need to log in
Judging by the output, you have an array
images := db.Read()
for _, img := range images {
fmt.Println(img.Original)
fmt.Println(img.Crop)
}
images := db.Read()
for _, img := range *images {
fmt.Println(img.Original)
fmt.Println(img.Crop)
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question