previewserver

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Browser              string
	DarkMode             bool
	FixedPort            int
	OpenBrowserOnStartup bool
)

Functions

func Openbrowser added in v0.3.0

func Openbrowser(url, browser string) error

func WaitForClients added in v0.4.1

func WaitForClients(timeout time.Duration) error

Types

type Server

type Server struct {
	Server         *http.Server
	InitialContent string
	Port           int
}

func New

func New() *Server

func (*Server) Start

func (s *Server) Start()

func (*Server) Stop

func (s *Server) Stop()

Stop gracefully shuts down the server.

func (*Server) Update

func (s *Server) Update(filename, newContent, section string, meta map[string]interface{})

Update updates the current HTML content.

Jump to

Keyboard shortcuts

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