build

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: ISC Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Deployment = Production

Deployment specifies a production build.

View Source
const LoggingType = LogTypeDefault

LoggingType is a log type that writes to both stdout and the log rotator, if present.

Variables

View Source
var LogLevel = "info"

LogLevel specifies the default log level.

Functions

func IsDevBuild

func IsDevBuild() bool

IsDevBuild returns true if this is a development build.

func IsProdBuild

func IsProdBuild() bool

IsProdBuild returns true if this is a production build.

func NewSubLogger

func NewSubLogger(subsystem string,
	genSubLogger func(string) btclog.Logger) btclog.Logger

NewSubLogger constructs a new subsystem log from the current LogWriter implementation. This is primarily intended for use with stdlog, as the actual writer is shared amongst all instantiations.

func Version

func Version() string

Version returns the application version as a properly formed string per the semantic versioning 2.0.0 spec (http://semver.org/).

Types

type DeploymentType

type DeploymentType byte

DeploymentType is an enum specifying the deployment to compile.

const (
	// Development is a deployment that includes extra testing hooks and
	// logging configurations.
	Development DeploymentType = iota

	// Production is a deployment that strips out testing logic and uses
	// Default logging.
	Production
)

func (DeploymentType) String

func (b DeploymentType) String() string

String returns a human readable name for a build type.

type LogType

type LogType byte

LogType is an indicating the type of logging specified by the build flag.

const (
	// LogTypeNone indicates no logging.
	LogTypeNone LogType = iota

	// LogTypeStdOut all logging is written directly to stdout.
	LogTypeStdOut

	// LogTypeDefault logs to both stdout and a given io.PipeWriter.
	LogTypeDefault
)

func (LogType) String

func (t LogType) String() string

String returns a human readable identifier for the logging type.

Jump to

Keyboard shortcuts

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