server

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigServers       = "servers"
	ConfigDefaultServer = "defaultServer"
)

Variables

This section is empty.

Functions

func AddServer

func AddServer(serverURL string)

AddServer adds a server URL to the known list (idempotent).

func DefaultServer

func DefaultServer() string

DefaultServer returns the default Bitbucket server URL.

func MatchByHostname added in v1.1.0

func MatchByHostname(rawURL string) string

MatchByHostname finds a registered server whose hostname matches the hostname of rawURL (ignoring scheme, port, and context path). This is used to recover the context path (e.g. /stash/) when only a bare server URL was derived from an SSH remote. Returns "" if no match is found.

func RemoveServer

func RemoveServer(serverURL string)

RemoveServer removes a server URL from the known list.

func Servers

func Servers() []string

Servers returns all registered Bitbucket server URLs.

func SetDefaultServer

func SetDefaultServer(serverURL string)

SetDefaultServer sets the default server URL (also adds it to the list).

Types

This section is empty.

Jump to

Keyboard shortcuts

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