code: func interpolationFuncCidrSubnet() ast.Function {
  	return ast.Function{
  		ArgTypes: []ast.Type{
  			ast.TypeString, // starting CIDR mask
  			ast.TypeInt,    // number of bits to extend the prefix
  			ast.TypeInt,    // network number to append to the prefix
  		},
  		ReturnType: ast.TypeString,
  		Variadic:   false,
  		Callback: func(args []interface{}) (interface{}, error) {
  			extraBits := args[1].(int)
  			subnetNum := args[2].(int)
  			_, network, err := net.ParseCIDR(args[0].(string))
  			if err != nil {
  				return nil, fmt.Errorf("invalid CIDR expression: %s", err)
  			}
  
  			// For portability with 32-bit systems where the subnet number
  			// will be a 32-bit int, we only allow extension of 32 bits in
  			// one call even if we're running on a 64-bit machine.
  			// (Of course, this is significant only for IPv6.)
  			if extraBits > 32 {
  				return nil, fmt.Errorf("may not extend prefix by more than 32 bits")
  			}
  
  			newNetwork, err := cidr.Subnet(network, extraBits, subnetNum)
  			if err != nil {
  				return nil, err
  			}
  
  			return newNetwork.String(), nil
  		},
  	}
  }
docs: // interpolationFuncCidrSubnet implements the "cidrsubnet" function that
  // adds an additional subnet of the given length onto an existing
  // IP block expressed in CIDR notation.