Documentation
¶
Overview ¶
Package scp provides access to the Super Check Partial (http://www.supercheckpartial.com) database stored in the SCP format. The package also provides functions to download, store and update a MASTER.SCP file. The default remote location for the MASTER.SCP file is http://www.supercheckpartial.com/MASTER.SCP.
File Format Description ¶
1. The file is in plain text format (ASCII). 2. Each line contains one callsign. 3. Lines that begin with # are comments that can be ignored.
Index ¶
Constants ¶
const DefaultLocalFilename = ".config/hamradio/MASTER.SCP"
DefaultLocalFilename is the default name for the file that is used to store the contents of MASTER.SCP locally in the user's home directory.
const DefaultURL = "http://www.supercheckpartial.com/MASTER.SCP"
DefaultURL is the original URL of the MASTER.SCP file: http://www.supercheckpartial.com/MASTER.SCP
Variables ¶
This section is empty.
Functions ¶
func LocalFilename ¶
LocalFilename returns the absolute path of the default local filename in the current user's home directory.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database represents the SCP database.
func LoadRemote ¶
LoadRemote loads the database file from a remote URL.
func (Database) FindDetailed ¶
func (database Database) FindDetailed(s string) ([]EditScript, error)
Find all strings in database that partially match the given string with detailed information on how the string matches.
type Edit ¶
type Edit struct {
OP EditOperation
S string
}
type EditOperation ¶
type EditOperation int
const ( NOP EditOperation = iota Insert Delete Substitute )
type EditScript ¶
type EditScript []Edit
func (EditScript) LongestMatch ¶
func (s EditScript) LongestMatch() int
func (EditScript) String ¶
func (s EditScript) String() string