gbuild

package
v2.4.3 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 7 Imported by: 21

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.

Jump to

Keyboard shortcuts

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