url

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package url provides utilities for URL parsing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidURLScheme

func IsValidURLScheme(s string) bool

IsValidURLScheme checks if a string represents a valid URL scheme.

A valid url scheme is one that matches the regex [a-zA-Z][a-zA-Z0-9+\-\.]*.

func ParsePort

func ParsePort(s string) (v uint16, err error)

ParsePort parses a string into a valid port. A port is between 0 and 65535 (inclusive). It may not start with "+" and must only consist of digits.

When a port can not be parsed, returns 0 and an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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