baseurl

package module
v0.0.0-...-00a011a Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: MIT Imports: 2 Imported by: 0

README

NO LONGER MAINTAINED

Documentation

Overview

Package baseurl provide utility to access X-Base-Url http header.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Current

func Current(r *http.Request) string

Current return current url.

func Get

func Get(r *http.Request) (string, bool)

Get return base url.

return empty string if base url cannot be inferred from request header. base url will not have trailing slash

func MustGet

func MustGet(r *http.Request) string

MustGet is like Get, but instead return empty string it will recreate url from r if Get return empty string

Types

This section is empty.

Jump to

Keyboard shortcuts

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