dnsutil

package
v1.1.73 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: BSD-3-Clause Imports: 2 Imported by: 51 modules, 433 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.

Documentation

Overview

Package dnsutil contains higher-level methods useful with the dns package. While package dns implements the DNS protocols itself, these functions are related but not directly required for protocol processing. They are often useful in preparing input/output of the functions in package dns.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOrigin

func AddOrigin(s, origin string) string

AddOrigin adds origin to s if s is not already a FQDN. Note that the result may not be a FQDN. If origin does not end with a ".", the result won't either. This implements the zonefile convention (specified in RFC 1035, Section "5.1. Format") that "@" represents the apex (bare) domain. i.e. AddOrigin("@", "foo.com.") returns "foo.com.".

func TrimDomainName

func TrimDomainName(s, origin string) string

TrimDomainName trims origin from s if s is a subdomain. This function will never return "", but returns "@" instead (@ represents the apex domain).

Types

This section is empty.

Jump to

Keyboard shortcuts

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