Documentation ¶
Index ¶
- Constants
- Variables
- func CleanCache() error
- func Confirm(str string) bool
- func InstallPython(config Config, version Version, needLatest bool) error
- func PrintVersionMap(vm map[int]Version)
- func PrintVersions(vs []Version)
- func ReadConfig(path string, config *Config) error
- func StatusCommand(config Config) error
- func UninstallPython(config Config, version Version) error
- func UpdateAll(config Config) error
- func UpdateLatest(config Config, version Version) error
- func YesOrNo(f bool) string
- type Config
- type Tag
- type Version
- func (v Version) Compare(o Version) int
- func (v Version) Count() int
- func (v Version) Equal(o Version) bool
- func (v Version) GreaterThan(o Version) bool
- func (v Version) GreaterThanOrEqual(o Version) bool
- func (v Version) LessThan(o Version) bool
- func (v Version) LessThanOrEqual(o Version) bool
- func (v Version) MarshalJSON() ([]byte, error)
- func (v *Version) Set(val string) error
- func (v Version) String() string
- func (v Version) Type() string
- func (v *Version) UnmarshalJSON(data []byte) error
- type VersionCache
Constants ¶
View Source
const (
BaseUrl = "https://api.github.com/repos/python/cpython/tags?per_page=100&page=%d"
)
Variables ¶
View Source
var ( ConfigPath string WithVerbose int )
View Source
var (
SkipConfirm bool
)
Functions ¶
func CleanCache ¶
func CleanCache() error
func PrintVersionMap ¶
func PrintVersions ¶
func PrintVersions(vs []Version)
func ReadConfig ¶ added in v0.0.2
func StatusCommand ¶
func UninstallPython ¶
func UpdateLatest ¶
Types ¶
type Version ¶
func NewVersion ¶
func (Version) Count ¶
Count return: if ?.0.0 -> 1 if ?.?.0 -> 2 if ?.?.? -> 3 if ?.?.?[a,b,rc]? -> 4
func (Version) GreaterThanOrEqual ¶
GreaterThanOrEqual v >= o
func (Version) LessThanOrEqual ¶
LessThanOrEqual v <= o
func (Version) MarshalJSON ¶
func (*Version) UnmarshalJSON ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.