config

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExtractFormatPot  = "pot"
	ExtractFormatJSON = "json"
)
View Source
const (
	SpreakPackagePath         = "github.com/vorlif/spreak"
	SpreakLocalizePackagePath = SpreakPackagePath + "/localize"
	XSpreakPackagePath        = SpreakPackagePath + "/xspreak"
)

Variables

This section is empty.

Functions

func IsValidSpreakPackage

func IsValidSpreakPackage(pkg string) bool

func ShouldExtractPackage

func ShouldExtractPackage(pkg string) bool

func ShouldScanPackage

func ShouldScanPackage(pkg string) bool

func ShouldScanStruct

func ShouldScanStruct(pkg string) bool

Types

type Config

type Config struct {
	IsVerbose       bool
	CurrentDir      string
	SourceDir       string
	OutputDir       string
	OutputFile      string
	CommentPrefixes []string
	ExtractErrors   bool
	ErrorContext    string

	TemplatePatterns []string
	Keywords         []*tmpl.Keyword

	DefaultDomain   string
	WriteNoLocation bool
	WrapWidth       int
	DontWrap        bool

	OmitHeader      bool
	CopyrightHolder string
	PackageName     string
	BugsAddress     string

	MaxDepth int
	Args     []string

	Timeout time.Duration

	ExtractFormat     string
	TmplIsMonolingual bool
}

func NewDefault

func NewDefault() *Config

func (*Config) Prepare

func (c *Config) Prepare() error

Jump to

Keyboard shortcuts

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