Documentation
¶
Index ¶
- Constants
- func Execute()
- func NewCacheCmd() *cobra.Command
- func NewCacheUpdateCmd() *cobra.Command
- func NewMXattrCmd() *cobra.Command
- func NewMatchCmd() *cobra.Command
- func NewRootCmd() *cobra.Command
- func NewSearchCmd() *cobra.Command
- func NewTagCmd() *cobra.Command
- type MatchResult
- type MatchResults
Constants ¶
View Source
const ( FlagDistance = "distance" FlagDistanceShorthand = "d" )
View Source
const ( FlagApply = "apply" FlagApplyShorthand = "a" )
View Source
const (
ErrAPI = common.Error("api error")
)
View Source
const (
ErrPatchNotFound = common.Error("path not found")
)
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func NewCacheCmd ¶
func NewCacheUpdateCmd ¶
func NewMXattrCmd ¶
func NewMatchCmd ¶
func NewRootCmd ¶
func NewSearchCmd ¶
Types ¶
type MatchResult ¶
type MatchResult struct { MatchTerm string SearchTerm string // normalized search term FoundTitle string FoundID int Distance float64 }
func (*MatchResult) Episode ¶
func (m *MatchResult) Episode() string
func (*MatchResult) IsMatch ¶
func (m *MatchResult) IsMatch(lowerBoundary float64) bool
func (*MatchResult) String ¶
func (m *MatchResult) String() string
func (*MatchResult) Tag ¶
func (m *MatchResult) Tag() string
func (*MatchResult) TaggedPath ¶
func (m *MatchResult) TaggedPath() string
type MatchResults ¶
type MatchResults []MatchResult
func (MatchResults) LongestMatchTerm ¶
func (m MatchResults) LongestMatchTerm() int
func (MatchResults) LongestTaggedPath ¶
func (m MatchResults) LongestTaggedPath() int
func (MatchResults) Sort ¶
func (m MatchResults) Sort()
Click to show internal directories.
Click to hide internal directories.