pub struct Version {
pub version: String,
pub active: bool,
}Fields§
§version: String§active: boolImplementations§
Source§impl Version
impl Version
pub fn list_upstream_go_versions_filter( host: &str, filter: Option<ToolchainFilter>, ) -> Result<Vec<String>, Error>
Sourcepub fn list_upstream_go_versions(host: &str) -> Result<Vec<String>, Error>
pub fn list_upstream_go_versions(host: &str) -> Result<Vec<String>, Error>
list upstream go versions if get go version failure from http then fallback use git.
pub fn match_version_req(host: &str, ver_pattern: &str) -> Result<String, Error>
Sourcepub fn get_upstream_latest_go_version(host: &str) -> Result<String, Error>
pub fn get_upstream_latest_go_version(host: &str) -> Result<String, Error>
get upstream latest go version.
Sourcepub fn remove_go_version(version: &str) -> Result<(), Error>
pub fn remove_go_version(version: &str) -> Result<(), Error>
remove the go version, if it is current active go version, will ignore deletion.
Sourcepub fn remove_go_versions(vers: &[&str]) -> Result<(), Error>
pub fn remove_go_versions(vers: &[&str]) -> Result<(), Error>
remove multiple go version, if it is current active go version, will ignore deletion.
Sourcepub fn list_cache(contain_sha256: Option<bool>) -> Result<Vec<String>, Error>
pub fn list_cache(contain_sha256: Option<bool>) -> Result<Vec<String>, Error>
list ${HOME}/.goup/cache directory items(only file, ignore directory).
Sourcepub fn remove_cache() -> Result<(), Error>
pub fn remove_cache() -> Result<(), Error>
remove ${HOME}/.goup/cache directory.
Sourcepub fn remove_goup_home() -> Result<(), Error>
pub fn remove_goup_home() -> Result<(), Error>
remove ${HOME}/.goup directory.
Sourcepub fn normalize(ver: &str) -> String
pub fn normalize(ver: &str) -> String
normalize the version string. 1.21.1 -> go1.21.1 go1.21.1 -> go1.21.1 tip -> gotip gotip -> gotip
Sourcepub fn semantic(ver: &str) -> Result<SemVersion>
pub fn semantic(ver: &str) -> Result<SemVersion>
semantic go version string. 1 -> 1.0.0 1.21 -> 1.21.0 1.21rc2 -> 1.21.0-rc2 1.21.1rc2 -> 1.21.1-rc2 1.21-rc2 -> 1.21.0-rc2 1.21.1-rc2 -> 1.21.1-rc2 1.21.1 -> 1.21.1
Trait Implementations§
impl Eq for Version
Source§impl Ord for Version
impl Ord for Version
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Version
impl PartialOrd for Version
impl StructuralPartialEq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnsafeUnpin for Version
impl UnwindSafe for Version
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more