common

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDataPath        = "~/.gomorphy/data"
	HTTPHeaderLastModified = "Last-Modified"
)

Variables

View Source
var (
	ErrUnmarshal      = errors.New("unmarshal")
	ErrMarshal        = errors.New("marshal")
	ErrUnknownNode    = errors.New("unknown node")
	ErrEmptyValue     = errors.New("empty value")
	ErrChildrenError  = errors.New("node children")
	ErrIndexSize      = errors.New("index size")
	ErrUnexpectedItem = errors.New("unexpected item")
)
View Source
var ErrPath = errors.New("path")

ErrPath represents filepath related errors.

Functions

func DomainDataPath

func DomainDataPath(domain string) string

func DomainFilePath

func DomainFilePath(domain string, fileName string) string

func GetDataPath

func GetDataPath() string

func MakeDomainDataPath

func MakeDomainDataPath(domain string) (err error)

Types

type Dictionary

type Dictionary interface {
	Load(filePath string) error // Load dictionary from specified path
}

type DomainDataLoader

type DomainDataLoader interface {
	GetDataPath() string
}

DomainDataLoader requires implementation declares methods to deal with remote data and storage path.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL