usl

package module
v0.0.0-...-6e15c62 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 9 Imported by: 0

README

USL (Uniform Source Locator)

A tiny library and its accompanying cli program to parse Git like URLs (aka USLs).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type USL

type USL struct {
	Class    string // Source class
	Domain   string // url.URL Host without port
	Fragment string // url.URL Fragment
	BasePath string // url.URL Path without leading and trailing slashes
	Host     string // url.URL Host
	InPath   string // Relative path after root source
	Name     string // Name of the source in relative path form
	Password string // url.Userinfo Password
	Path     string // url.URL Port
	Port     string // url.URL Port
	Ref      string // Git reference (i.e. branch, tag, commit)
	Scheme   string // url.URL Scheme
	Username string // url.Userinfo Username
}

USL should be commented

func Parse

func Parse(rawurl string) (*USL, error)

Parse should be commented

func (*USL) ID

func (us *USL) ID() string

ID should be commented

func (*USL) Map

func (us *USL) Map() (map[string]string, []string)

Map should be commented

func (*USL) Source

func (us *USL) Source() string

Source should be commented

func (*USL) String

func (us *USL) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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