set-property

command module
v0.0.0-...-ec28ea6 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Implements a properties file manipulator that copies over a value from an environment variable optionally applying constraints and mappings.

Bulk JSON definitions can specify a fallback for a property that is absent from the file and whose environment variable is unset:

{
  "server-ip": {"env": "SERVER_IP", "fallback": ""},
  "motd": {"env": "MOTD", "fallback": "Welcome"}
}

The fallback may be an empty string, and env may be omitted. Fallbacks are literal values; mappings and allowed do not apply to them. Existing properties, including empty ones, are not replaced by fallbacks. As with other definitions, an environment variable set to an empty string does not change the property, and it prevents the fallback from being used.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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