Documentation
¶
Index ¶
- Constants
- func Exists(name string) (bool, error)
- func IsNoExist(name string) (bool, error)
- func Platform(opts ...Option) (string, error)
- func PlatformByVersion(version string, opts ...Option) (string, error)
- func RAC(opts ...Option) (string, error)
- func RACByVersion(version string, opts ...Option) (string, error)
- func ThinkClient(opts ...Option) (string, error)
- func ThinkClientByVersion(version string, opts ...Option) (string, error)
- type BitnessType
- type Filter
- type FilterByfunc
- type Finder
- func (f *Finder) AddDir(dir string, ver string, bit BitnessType)
- func (f *Finder) DefaultDirs()
- func (f *Finder) ForceScan() (err error)
- func (f *Finder) Platform(filter Filter) (string, error)
- func (f *Finder) RAC(filter Filter) (string, error)
- func (f *Finder) Scan() error
- func (f *Finder) ThinkClient(filter Filter) (string, error)
- type Option
- type PlatformVersion
- type QueryOptions
- type VersionList
Constants ¶
View Source
const ( PlatformType exeType = iota ThinkClientType RACType )
View Source
const GOOS = runtime.GOOS
View Source
const SEEK_ERROR_NOT_FOUNDED = "any platform version is not founded"
Variables ¶
This section is empty.
Functions ¶
func ThinkClient ¶
Types ¶
type BitnessType ¶
type BitnessType int
const ( V8_x64 BitnessType = iota V8_x32 V8_x64x32 V8_x32x64 )
type Filter ¶
type Filter interface {
Apply(l VersionList) VersionList
}
type FilterByfunc ¶
type FilterByfunc func(version PlatformVersion) bool
type Finder ¶
type Finder struct {
// contains filtered or unexported fields
}
func NewPlatformFinder ¶
func NewPlatformFinder() *Finder
func (*Finder) DefaultDirs ¶
func (f *Finder) DefaultDirs()
type Option ¶
type Option func(f *QueryOptions)
func WithBitness ¶
func WithBitness(bitness BitnessType) Option
func WithFinder ¶
func WithVersion ¶
type PlatformVersion ¶
type PlatformVersion struct {
// contains filtered or unexported fields
}
func (PlatformVersion) Bitness ¶
func (v PlatformVersion) Bitness() BitnessType
func (PlatformVersion) IsEmpty ¶
func (v PlatformVersion) IsEmpty() bool
func (PlatformVersion) Platform ¶
func (v PlatformVersion) Platform() string
func (PlatformVersion) RAC ¶
func (v PlatformVersion) RAC() string
func (PlatformVersion) ThinkClient ¶
func (v PlatformVersion) ThinkClient() string
func (PlatformVersion) Version ¶
func (v PlatformVersion) Version() string
type QueryOptions ¶
type QueryOptions struct {
// contains filtered or unexported fields
}
func (*QueryOptions) Options ¶
func (f *QueryOptions) Options(opts []Option)
type VersionList ¶
type VersionList []PlatformVersion
func (VersionList) ApplyFilter ¶
func (l VersionList) ApplyFilter(f Filter) (pv PlatformVersion)
func (VersionList) FilterBy ¶
func (l VersionList) FilterBy(f FilterByfunc) VersionList
Click to show internal directories.
Click to hide internal directories.