get_mine

Function get_mine 

Source
pub fn get_mine(
    h: &Helper<'_, '_>,
    _: &Handlebars<'_>,
    _: &Context,
    _rc: &mut RenderContext<'_, '_>,
    out: &mut dyn Output,
) -> HelperResult
Expand description

A templating helper that retrieves the value for current host from a map, returns a default value when current host is not recorded in the map.

Usage:

  1. {{ get_mine }}

    Renders current machine’s hostname.

  2. {{ get_mine <map> <default-value> }}

    Renders <map>.$CURRENT_HOSTNAME, falls back to <default-value>.