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

serve

package
v0.1.14 Latest Latest
Warning

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

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

Documentation

Overview

Package serve previews compiled pages and recompiles them on every change. Only HTTP responses receive the reload client; deployable output stays untouched.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(ctx context.Context, directory string, options Options) error

Types

type Options

type Options struct {
	Port         int
	ExplicitPort bool
	Open         bool
	Log          io.Writer
	Waiting      func() // another compile of the project holds its lock
	OnBuild      func(compile.Result, error)
}

Jump to

Keyboard shortcuts

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