Make the result more readable
This commit is contained in:
parent
92d7e6b59c
commit
b3ceec87fd
12
main.go
12
main.go
|
@ -116,8 +116,16 @@ func main() {
|
|||
fmt.Println(usage.Lang)
|
||||
fmt.Println("Part of Speech:", usage.PartOfSpeech)
|
||||
fmt.Println("Definitions:")
|
||||
for _, definition := range usage.Definitions {
|
||||
fmt.Println(definition)
|
||||
for i, definition := range usage.Definitions {
|
||||
fmt.Print(i + 1, ". ")
|
||||
fmt.Println(definition.Def)
|
||||
if definition.Examples != nil {
|
||||
fmt.Println("Examples")
|
||||
for _, example := range definition.Examples {
|
||||
fmt.Print("- ")
|
||||
fmt.Println(example)
|
||||
}
|
||||
}
|
||||
}
|
||||
fmt.Println()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue