url

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: CC-BY-SA-4.0 Imports: 2 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type URL

type URL struct {
	Scheme string
	Host   string
	Path   string
}

A URL represents a parsed URL.

func Parse

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

Parse parses a URL string into a URL structure.

Example
package main

import (
	"fmt"
	"log"

	"github.com/inancgumus/gobyexample/url"
)

func main() {
	uri, err := url.Parse("https://github.com/inancgumus")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(uri)
}
Output:

https://github.com/inancgumus

func (*URL) String

func (u *URL) String() string

String reassembles the URL into a URL string.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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