Changeset 80 in code for trunk/version.go


Ignore:
Timestamp:
Dec 12, 2023, 2:09:17 PM (18 months ago)
Author:
Izuru Yakumo
Message:

A good time to finally release a stable version

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/version.go

    r79 r80  
    44import (
    55        "fmt"
    6         "time"
    76)
    87
    98var (
    10         // Set to current tag
    11         Version = "v0.7.0"
    12         Time = time.Now()
     9        // Variables set at build-time
     10        Date string
     11        Vendor string
     12        Version string
    1313)
    1414
    15 // FullVersion display the full version and build
    16 func FullVersion() string {
    17         d := Time.Day()
    18         m := Time.Month()
    19         y := Time.Year()
    20         return fmt.Sprintf("%v || %d.%d.%d", Version, y, m, d)
     15// PrintVersion only displays the obvious
     16func PrintVersion() string {
     17        return fmt.Sprintf("%s", Version)
    2118}
     19
     20// PrintFullVersion display the full version and build
     21func PrintFullVersion() string {
     22        return fmt.Sprintf("%s, built at %s, on %s", Version, Date, Vendor)
     23}
Note: See TracChangeset for help on using the changeset viewer.