Categorygithub.com/dyammarcano/version
repositorypackage
0.0.2
Repository: https://github.com/dyammarcano/version.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

ci-test Go Report Card Go Reference

Version display and features names

This package is used to display the version of the application and the number of features that it has. It uses the git tags to display the version and the number of features. and it generates a file with the version json data in the project root.

How to use

$ go install "github.com/dyammarcano/version@latest"

Example using the command line confirmation

$ version generate -p your_project_root

? Do you want to generate a new version?? [y/N] █
  • generating go file: your_project_root\internal\version\version.go
  • generating version file: your_project_root\VERSION

Example using the go generate with the -y flag to avoid the confirmation

$ version generate -p your_project_root -y

  • generating go file: your_project_root\internal\version\version.go
  • generating version file: your_project_root\VERSION

Map feature in your project

package main

import (
    "yourproject/version"
)

init() {
    version.AddFeature("feature1")
}

How to generate the version file

$ go generate ./...

VERSION file

{"version":"v0.0.0","commitHash":"5f600de951b8a0c5bb7b035d8f95aaaaf534c9e3","date":"2024-05-15T02:24:46Z"}