gbuild

package
Version: v2.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 7 Imported by: 2

Documentation

Overview

Package gbuild manages the build-in variables from "gf build".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Data

func Data() map[string]interface{}

Data returns the custom build-in variables as map.

func Get

func Get(name string, def ...interface{}) *gvar.Var

Get retrieves and returns the build-in binary variable with given name.

Types

type BuildInfo

type BuildInfo struct {
	GoFrame string                 // Built used GoFrame version.
	Golang  string                 // Built used Golang version.
	Git     string                 // Built used git repo. commit id and datetime.
	Time    string                 // Built datetime.
	Data    map[string]interface{} // All custom built data key-value pairs.
}

BuildInfo maintains the built info of current binary.

func Info

func Info() BuildInfo

Info returns the basic built information of the binary as map. Note that it should be used with gf-cli tool "gf build", which automatically injects necessary information into the binary.

Source Files

Jump to

Keyboard shortcuts

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