env

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMemoryLimit

func GetMemoryLimit() uint64

GetMemoryLimit returns the upper memory limit in bytes for Hugo's in-memory caches. Note that this does not represent "all of the memory" that Hugo will use, so it needs to be set to a lower number than the available system memory. It will read from the HUGO_MEMORYLIMIT (in Gigabytes) environment variable. If that is not set, it will set aside a quarter of the total system memory.

func GetNumWorkerMultiplier

func GetNumWorkerMultiplier() int

GetNumWorkerMultiplier returns the base value used to calculate the number of workers to use for Hugo's parallel execution. It returns the value in HUGO_NUMWORKERMULTIPLIER OS env variable if set to a positive integer, else the number of logical CPUs.

func SetEnvVars

func SetEnvVars(oldVars *[]string, keyValues ...string)

SetEnvVars sets vars on the form key=value in the oldVars slice.

func SplitEnvVar

func SplitEnvVar(v string) (string, string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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