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

web

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package web serves an indexed local file workspace and document views.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App composes discovery and document handlers into the HTTP API.

func New

func New(config Config) (*App, error)

New constructs a request-time scanning web interface.

func (*App) Close added in v0.1.6

func (a *App) Close()

Close stops running language servers.

func (*App) ServeHTTP

func (a *App) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP refuses requests for other hosts, then routes. Every request rescans the project it names.

type Config

type Config struct {
	Roots      []string
	ScanDepth  int
	Depth      int
	Exclusions []string
	// Types decides presentation; Filenames decides which files are in scope.
	Types     *document.Registry
	Filenames files.NameFilter
	// LanguageServers runs language servers for requests that opt in; nil
	// uses the built-in servers for Types' text families. The App
	// closes it.
	LanguageServers *lsp.Manager
}

Config controls project discovery and the live file scan performed for each request. Roots confine every project; ScanDepth bounds repository discovery; Depth bounds the file scan within a project.

Jump to

Keyboard shortcuts

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