print_check_force

Function print_check_force 

Source
pub fn print_check_force(name: &str, current_version: &str, source: Source)
Expand description

Prints update information for a package from the specified source.

This is a convenience function that checks for updates and prints the result directly to stdout even if no update is available. To show the user the current status of the package, including whether an update is available.

§Arguments

  • name - The name of the package to check
  • current_version - The current version string (e.g., “1.0.0”)
  • source - The source to check for updates

§Examples

use update_available::{print_check_force, Source};

// Check crates.io
print_check_force("serde", "1.0.0", Source::CratesIo);

// Check GitHub
print_check_force("my-repo", "0.1.0", Source::Github("username".to_string()));

// Check Gitea
print_check_force("my-repo", "0.1.0", Source::Gitea("username".to_string(), "https://gitea.example.com".to_string()));