Help us shape the future of Go! Take the 2026 Go Developer Survey

listenport

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package listenport plans a live HTTP port change without moving Git data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAlias

func AddAlias(rawPort string) error

AddAlias keeps the current listener open, adds another HTTP port, and makes that port the public URL for clone and web links.

func Apply

func Apply(rawPort string) error

Apply rebinds plain HTTP onto the new port and stores the public URL. The new socket is opened before the old one is closed. A failed config write binds the previous port again.

func RewriteRootURL

func RewriteRootURL(rawURL, newPort string) (string, error)

RewriteRootURL moves the public site URL onto the new listen port. The path, scheme, and credentials are kept. An IPv6 host stays bracketed.

func ValidatePort

func ValidatePort(raw string) (string, error)

ValidatePort accepts a TCP port that can be bound by the server.

Types

This section is empty.

Jump to

Keyboard shortcuts

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