Define structs
This commit is contained in:
parent
c300302227
commit
203f415c31
10
main.go
10
main.go
|
@ -9,6 +9,16 @@ import (
|
|||
"os"
|
||||
)
|
||||
|
||||
type Entry struct {
|
||||
PartOfSpeech string `json:"partOfSpeech"`
|
||||
Language string `json::"language"`
|
||||
Definitions []Definition `json:"definitions"`
|
||||
}
|
||||
|
||||
type Definition struct {
|
||||
Def string `json:"definition"`
|
||||
examples []string `json:"examples"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
response, err := http.Get("https://en.wiktionary.org/api/rest_v1/page/definition/général")
|
||||
|
|
Loading…
Reference in New Issue