package dict
import "golang.org/x/net/dict"
Package dict implements the Dictionary Server Protocol as defined in RFC 2229.
The dict package is frozen and is not accepting new features.
Index ¶
- type Client
- func Dial(network, addr string) (*Client, error)
- func (c *Client) Close() error
- func (c *Client) Define(dict, word string) ([]*Defn, error)
- func (c *Client) Dicts() ([]Dict, error)
- type Defn
- type Dict
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
A Client represents a client connection to a dictionary server.
func Dial ¶
Dial returns a new client connected to a dictionary server at addr on the given network.
func (*Client) Close ¶
Close closes the connection to the dictionary server.
func (*Client) Define ¶
Define requests the definition of the given word. The argument dict names the dictionary to use, the Name field of a Dict returned by Dicts.
The special dictionary name "*" means to look in all the server's dictionaries. The special dictionary name "!" means to look in all the server's dictionaries in turn, stopping after finding the word in one of them.
func (*Client) Dicts ¶
Dicts returns a list of the dictionaries available on the server.
type Defn ¶
type Defn struct { Dict Dict // Dict where definition was found Word string // Word being defined Text []byte // Definition text, typically multiple lines }
A Defn represents a definition.
type Dict ¶
A Dict represents a dictionary available on the server.
Source Files ¶
dict.go
- Version
- v0.35.0 (latest)
- Published
- Feb 10, 2025
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 7 minutes ago –
Tools for package owners.