Help us shape the future of Go! Take the 2026 Go Developer Survey

vdn

package module
v0.0.0-...-076a1cd Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2016 License: MIT Imports: 3 Imported by: 0

README

VDN - valid domain name

GoDoc

VDN(valid domain name) is used to check if s string is a valid domain name

Criteria

A complete domain name is valid if it meets the following criteria:

  • A complete domain name must have one or more subdomain names and one top-level domain name.
  • A complete domain name must use dots (.) to separate domain names.
  • Domain names must use only alphanumeric characters and dashes (-).
  • Domain and subdomain names must not begin or end with dashes (-).
  • Domain names must mot have more than 63 characters.
  • The top-level domain name must be one of the predefined top-level domain names, like (com), (org), or (ca)

TODO

  • unicode check

Ref

rfc1035

rfc3696

top-level domain db

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidDomain

func IsValidDomain(s string) bool

IsValidDomain checks if s string is a valid domain name https://tools.ietf.org/html/rfc1035 https://tools.ietf.org/html/rfc3696

Types

This section is empty.

Jump to

Keyboard shortcuts

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