ianlewis / go-stardict

A stardict library for Go
Apache License 2.0
11 stars 2 forks source link

go-stardict

Go Reference codecov Tests Go Report Card

A stardict dictionary library for Go.

Status

The API is currently unstable and will change. This package will use module version numbering to manage versions and compatibility.

Features

Installation

To install this package run

go get github.com/ianlewis/go-stardict

Examples

Searching a Dictionary

You can search a stardict dictionary directly and list the entries.

// Open dictonaries in a directory
dictionaries, _ := stardict.OpenAll(".")

// Search the dictionaries.
for _, d := range dictionaries {
  entries, _ := d.Search("banana")
  for _, e := range entries {
    // Print out matching index entries.
    fmt.Println(e)
  }
}

Related projects

References