View Source Exonerate.Formats.Hostname (exonerate v1.1.3)

Module which provides a macro that generates special code for a hostname filter.

the format is governed by section 2.1 of RFC 1123, which modifies RFC 952:

Link to this section Summary


Creates a parser ~hostname/1.

Link to this section Functions

Creates a parser ~hostname/1.

This function returns {:ok} if the passed string is a valid hostname, or {:error, reason} if it is not.

The function will only be created once per module, and it is safe to call the macro more than once.



  • :name (atom): the name of the function to create. Defaults to :"~hostname"