version

package
v1.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

* ChatCLI - Command Line Interface for LLM interaction * Copyright (c) 2024 Edilson Freitas * License: MIT

Index

Constants

This section is empty.

Variables

View Source
var (
	// Essas variáveis serão preenchidas durante a compilação via ldflags
	Version    = "dev"
	CommitHash = "unknown"
	BuildDate  = "unknown"

	// URL para verificar a versão mais recente (GitHub API)
	LatestVersionURL = "https://api.github.com/repos/diillson/chatcli/releases/latest"
)

Functions

func CheckLatestVersion

func CheckLatestVersion() (string, bool, error)

CheckLatestVersion verifica a versão mais recente disponível no GitHub Retorna a versão mais recente e um booleano indicando se há uma atualização disponível

func FormatVersionInfo

func FormatVersionInfo(info VersionInfo, includeLatest bool) string

FormatVersionInfo retorna uma string formatada com as informações de versão

func GetBuildInfo

func GetBuildInfo() (string, string, string)

GetBuildInfo obtém informações de build de forma mais robusta

Types

type VersionInfo

type VersionInfo struct {
	Version    string `json:"version"`
	CommitHash string `json:"commit_hash"`
	BuildDate  string `json:"build_date"`
}

Info retorna informações estruturadas sobre a versão atual

func GetCurrentVersion

func GetCurrentVersion() VersionInfo

GetCurrentVersion retorna as informações de versão atuais

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL