Documentation ¶
Index ¶
- Constants
- type Arch
- type BiggestFirst
- type BlacklistEntry
- type Candidate
- type CandidateFilter
- type Flavor
- type HighestScoreFirst
- type JarInfo
- type LinuxInfo
- type LoveInfo
- type MacosInfo
- type Penalty
- type PenaltyKind
- type ScoredCandidate
- type ScriptInfo
- type Verdict
- type WindowsInfo
- type WindowsInstallerType
Constants ¶
View Source
const ( // FlavorNativeLinux denotes native linux executables FlavorNativeLinux Flavor = "linux" // ExecNativeMacos denotes native macOS executables FlavorNativeMacos = "macos" // FlavorPe denotes native windows executables FlavorNativeWindows = "windows" // FlavorAppMacos denotes a macOS app bundle FlavorAppMacos = "app-macos" // FlavorScript denotes scripts starting with a shebang (#!) FlavorScript = "script" // FlavorScriptWindows denotes windows scripts (.bat or .cmd) FlavorScriptWindows = "windows-script" // FlavorJar denotes a .jar archive with a Main-Class FlavorJar = "jar" // FlavorHTML denotes an index html file FlavorHTML = "html" // FlavorLove denotes a love package FlavorLove = "love" )
View Source
const ( WindowsInstallerTypeMsi WindowsInstallerType = "msi" WindowsInstallerTypeInno = "inno" WindowsInstallerTypeNullsoft = "nsis" // self-extracting installer that unarchiver knows how to extract WindowsInstallerTypeArchive = "archive" )
View Source
const ( PenaltyExclude = iota PenaltyScore )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BiggestFirst ¶
type BiggestFirst struct {
// contains filtered or unexported fields
}
func (*BiggestFirst) Len ¶
func (bf *BiggestFirst) Len() int
func (*BiggestFirst) Less ¶
func (bf *BiggestFirst) Less(i, j int) bool
func (*BiggestFirst) Swap ¶
func (bf *BiggestFirst) Swap(i, j int)
type BlacklistEntry ¶
type BlacklistEntry struct {
// contains filtered or unexported fields
}
type Candidate ¶
type Candidate struct { Path string `json:"path"` Mode uint32 `json:"mode,omitempty"` Depth int `json:"depth"` Flavor Flavor `json:"flavor"` Arch Arch `json:"arch,omitempty"` Size int64 `json:"size"` Spell []string `json:"spell,omitempty"` WindowsInfo *WindowsInfo `json:"windowsInfo,omitempty"` LinuxInfo *LinuxInfo `json:"linuxInfo,omitempty"` MacosInfo *MacosInfo `json:"macosInfo,omitempty"` LoveInfo *LoveInfo `json:"loveInfo,omitempty"` ScriptInfo *ScriptInfo `json:"scriptInfo,omitempty"` JarInfo *JarInfo `json:"jarInfo,omitempty"` }
Candidate indicates what's interesting about a file
func SelectByArch ¶
func SelectByFlavor ¶
func SelectByFunc ¶
func SelectByFunc(candidates []*Candidate, f CandidateFilter) []*Candidate
type CandidateFilter ¶
type HighestScoreFirst ¶
type HighestScoreFirst struct {
// contains filtered or unexported fields
}
func (*HighestScoreFirst) Len ¶
func (hsf *HighestScoreFirst) Len() int
func (*HighestScoreFirst) Less ¶
func (hsf *HighestScoreFirst) Less(i, j int) bool
func (*HighestScoreFirst) Swap ¶
func (hsf *HighestScoreFirst) Swap(i, j int)
type PenaltyKind ¶
type PenaltyKind int
type ScoredCandidate ¶
type ScoredCandidate struct {
// contains filtered or unexported fields
}
type ScriptInfo ¶
type ScriptInfo struct {
Interpreter string `json:"interpreter,omitempty"`
}
type Verdict ¶
type Verdict struct { BasePath string `json:"basePath"` TotalSize int64 `json:"totalSize"` Candidates []*Candidate `json:"candidates"` }
func (*Verdict) FilterPlatform ¶
type WindowsInfo ¶
type WindowsInfo struct { InstallerType WindowsInstallerType `json:"installerType,omitempty"` Uninstaller bool `json:"uninstaller,omitempty"` Gui bool `json:"gui,omitempty"` DotNet bool `json:"dotNet,omitempty"` }
type WindowsInstallerType ¶
type WindowsInstallerType string
Click to show internal directories.
Click to hide internal directories.