url

package
v0.0.0-...-5a0bf87 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package url wraps the net/url package so that the url.URL type is Marshallable

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type URL

type URL url.URL

URL is an Unmarshallable url type

func Parse

func Parse(raw string) (*URL, error)

func (*URL) GetHost

func (u *URL) GetHost() string

GetHost url.Host without the port suffix

func (*URL) GetPath

func (u *URL) GetPath() string

GetPath returns url.Path with leading '/' removed

func (*URL) MarshalJSON

func (u *URL) MarshalJSON() ([]byte, error)

MarshalJSON turns url into a JSON string

func (*URL) String

func (u *URL) String() string

String returns the string representation

func (*URL) UnmarshalJSON

func (u *URL) UnmarshalJSON(p []byte) error

UnmarshalJSON parses JSON string into url.URL

Jump to

Keyboard shortcuts

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