urlutil

package
v0.1.103 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Inspired by similar approach in: https://github.com/helm/helm (Apache 2.0 License).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckLatestGitHubVersion added in v0.1.67

func CheckLatestGitHubVersion(ctx context.Context, repoURL string) (*semver.Version, error)

func Equal

func Equal(a, b string) bool

Equal normalizes two URLs and then compares for equality.

func ExtractHostname

func ExtractHostname(addr string) (string, error)

ExtractHostname returns hostname from URL.

func URLJoin

func URLJoin(baseURL string, paths ...string) (string, error)

URLJoin joins a base URL to one or more path components.

It's like filepath.Join for URLs. If the baseURL is pathish, this will still perform a join.

If the URL is unparsable, this returns 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