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

resolve

package
v0.43.15 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package resolve provides cross-worktree service discovery. It looks up another project's allocated port from the registry, respecting link overrides and falling back to same-branch matching.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver struct {
	Registry     *registry.Registry
	WorktreePath string
	Branch       string
}

Resolver resolves cross-worktree URLs from the registry. It checks link overrides first, then falls back to same-branch matching.

func New

func New(reg *registry.Registry, worktreePath, branch string) *Resolver

New creates a Resolver for the given worktree and its current branch.

func (*Resolver) Resolve

func (r *Resolver) Resolve(project string, explicitBranch ...string) (string, error)

Resolve returns the base URL (http://127.0.0.1:PORT) for a project. Without an explicit branch, it checks link overrides then falls back to the current worktree's branch. Returns an error if the target is not allocated.

Jump to

Keyboard shortcuts

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