godoc

package
Version: v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package godoc includes a method to serve a given package path on a given port on localhost.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server interface {
	Serve(repoPath, packagePath string, port int) (err error)
}

Server starts a godoc server showing the given package path.

func DefaultServer

func DefaultServer(settings ...SettingsFunc) Server

DefaultServer returns a godoc.Server with default settings.

type Settings

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

BaseSettings holds settings for the godoc server.

type SettingsFunc

type SettingsFunc func(s *Settings)

SettingsFunc is a function mutating attributes inside a given BaseSettings-structure.

func WithOpenBrowser

func WithOpenBrowser(yesNo bool) SettingsFunc

WithOpenBrowser sets whether a browser should be opened.

Source Files

Jump to

Keyboard shortcuts

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