flags

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	BaseURL            string
	GitHubPages        bool
	GitHubPagesToken   string
	GitHubPagesUser    string
	SourceLinkTemplate string
	OutputPath         string
	SiteDescription    string
	SiteTitle          string
	Watch              bool // not added as a flag, only enabled when running from ./cmd/watch
}

Args contains all command-line options for gopages

func Parse

func Parse(osArgs ...string) (Args, string, error)

func (Args) Linker

func (a Args) Linker(modulePackage string) (source.Linker, error)

type GoPagesLinker

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

func (*GoPagesLinker) LinkToSource

func (l *GoPagesLinker) LinkToSource(packagePath string, options source.LinkOptions) url.URL

type TemplateLinker

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

func (*TemplateLinker) LinkToSource

func (l *TemplateLinker) LinkToSource(packagePath string, options source.LinkOptions) url.URL

func (*TemplateLinker) ShouldScrapePackage

func (l *TemplateLinker) ShouldScrapePackage(packagePath string) bool

Jump to

Keyboard shortcuts

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