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

demo

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package demo is a stand-in for go-fileshare/portal with one server, whose files are the real WebDAV server fileshare serves shares with (go-filesystems/webdav) over a directory: what `explorer -demo` and the tests run against. It requires the portal's static header, as the portal does.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Portal

type Portal struct {
	*httptest.Server
	Dir string
	// contains filtered or unexported fields
}

Portal is the stand-in, serving dir as server "demo"'s share "files".

func New

func New(dir string, seed bool) (*Portal, error)

New serves dir; with seed, a few files and a folder are put in it first.

func (*Portal) Close

func (p *Portal) Close()

Close stops the server, then lets go of the directory: osfs holds it open (an os.Root), and Windows will not remove a directory that is held.

Jump to

Keyboard shortcuts

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