previewserver

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OpenBrowserOnStartup bool

Functions

func Openbrowser added in v0.3.0

func Openbrowser(url string) 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(newContent string, section string)

Update updates the current HTML content.

Jump to

Keyboard shortcuts

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