url

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

* @Author: 7erry * @Date: 2024-09-29 14:41:35 * @LastEditTime: 2024-12-14 16:30:24 * @Description: Parse Input to make sure the provided URL is correct

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSsh

func IsSsh(input string) bool

IsSsh check if an input value is a ssh url or not

func Protocols

func Protocols(input string) []string

Protocols returns the protocols of an input url.

Types

type RepoURL

type RepoURL struct {
	Protocols []string
	Protocol  string
	Port      *int
	Resource  string
	User      string
	Pathname  string
	Hash      string
	Search    string
	URL       string
	Query     url.Values
}

func NewRepoURL

func NewRepoURL(url string) RepoURL

func ParseURL

func ParseURL(input string) RepoURL

ParseURL parse paths (local paths, urls: ssh/git/etc)

Jump to

Keyboard shortcuts

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