cmd

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Bundle = sync.OnceValue(func() *i18n.Bundle {
	bundle := i18n.NewBundle(language.English)
	bundle.RegisterUnmarshalFunc("toml", toml.Unmarshal)

	_, err := bundle.LoadMessageFileFS(localesFS, "locales/zh-Hans.toml")
	if err != nil {
		slog.Error(err.Error())
		os.Exit(1)
	}

	return bundle
})
View Source
var DefaultLocalizer = sync.OnceValue(func() *i18n.Localizer {
	return i18n.NewLocalizer(Bundle(), Languages()...)
})

Functions

func CheckMark added in v0.3.0

func CheckMark(b bool) string

func Execute

func Execute()

func Languages added in v0.3.2

func Languages() []string

func Localize added in v0.3.2

func Localize(message *i18n.Message) string

func LocalizeConfig added in v0.3.2

func LocalizeConfig(config *i18n.LocalizeConfig) string

Types

type Settings added in v0.3.0

type Settings struct {
	Proxy         string // bool
	ProxyAddress  string
	Script        string // bool
	ScriptAddress string
	AutoDetect    string // bool
	BypassList    []string
}

func Render added in v0.3.0

func Render(s winproxy.Settings) Settings

func (Settings) BaseInfoRows added in v0.3.1

func (s Settings) BaseInfoRows() [][]string

func (Settings) BaseInfoTable added in v0.3.0

func (s Settings) BaseInfoTable() *table.Table

func (Settings) BypassListTable added in v0.3.0

func (s Settings) BypassListTable() *table.Table

func (Settings) String added in v0.3.0

func (s Settings) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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