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 AnnotatedMatch ¶ added in v0.1.1
type AnnotatedMatch []Part
func (AnnotatedMatch) LongestPart ¶ added in v0.1.1
func (s AnnotatedMatch) LongestPart() int
func (AnnotatedMatch) String ¶ added in v0.1.1
func (s AnnotatedMatch) String() string
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) FindAnnotated ¶ added in v0.1.1
func (database Database) FindAnnotated(s string) ([]AnnotatedMatch, error)
Find all strings in database that partially match the given string with detailed information on how the string matches.
type MatchingOperation ¶ added in v0.1.1
type MatchingOperation int
const ( NOP MatchingOperation = iota Insert Delete Substitute )
type Part ¶ added in v0.1.1
type Part struct {
OP MatchingOperation
S string
}