buildmeta

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 3 Imported by: 2

README

buildmeta

Tiny go module to hold build and runtime information

Install

go get github.com/avakarev/go-util/buildmeta

Usage

package main

import (
	"fmt"

	"github.com/avakarev/go-util/buildmeta"
)

func main() {
	fmt.Println(buildmeta.Compiler()) // => go1.18.3
}

License

go-buildmeta is licensed under MIT license. (see LICENSE)

Documentation

Overview

Package buildmeta holds build and runtime information

Index

Constants

This section is empty.

Variables

View Source
var (
	// Commit is git commit sha
	Commit string

	// Ref is git branch or tag ref name
	Ref string

	// BuildTimeUTC is a build datetime in UTC
	BuildTimeUTC string
)

Functions

func Arch

func Arch() string

Arch returns running program's architecture target

func Compiler

func Compiler() string

Compiler returns Go compiler version

func Fields

func Fields() map[string]interface{}

Fields returns build meta as map

func OS

func OS() string

OS returns running program's operating system target

func Time

func Time() string

Time returns server's local time

func Timezone

func Timezone() string

Timezone returns server's local timezone

func Uptime

func Uptime() string

Uptime return server's uptime

Types

This section is empty.

Jump to

Keyboard shortcuts

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