run

package module
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 10 Imported by: 0

README

run

Tools to run an executable from within a Go application

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Firefox added in v1.1.0

func Firefox(url string) (err error)

func HTML2DOC

func HTML2DOC(source string, target string, options ...Option) (result string, err error)

func HTML2PDF

func HTML2PDF(source string, target string, options ...Option) (result string, err error)

func MakeJPG

func MakeJPG(source string, target string, options ...Option) (result string, err error)

func Open added in v1.0.1

func Open(path string, options ...Option) (err error)

func RangePDF

func RangePDF(source string, target string, options ...Option) (err error)

func ResizeJPG

func ResizeJPG(source string, target string, kbsize int, options ...Option) (result string, err error)

func Run

func Run(program string, args []string, options ...Option) (stdout *bytes.Buffer, stderr *bytes.Buffer, cmd *exec.Cmd, err error)

func SQLite2CSV added in v1.1.0

func SQLite2CSV(sqlitedb string, table string, target string, options ...Option) (resultpath string, err error)

func ShowHTML added in v1.2.0

func ShowHTML(source string, options ...Option) (err error)

func SplitPDF

func SplitPDF(source string, target string, options ...Option) (err error)

func VSCode added in v1.0.1

func VSCode(workspace string, fname string, options ...Option) (err error)

func WithDoNotRun

func WithDoNotRun(c *Config)

func WithDoNotWait

func WithDoNotWait(c *Config)

func WithErrorCatch

func WithErrorCatch(c *Config)

func WithHideError

func WithHideError(c *Config)

func WithHideOutput

func WithHideOutput(c *Config)

func WithLookInCwd

func WithLookInCwd(c *Config)

func WithOutputCatch

func WithOutputCatch(c *Config)

func WithOverwrite

func WithOverwrite(c *Config)

func WriteToPipe

func WriteToPipe(program string, args []string, options ...Option) (io.WriteCloser, error)

Types

type Config

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

func NewCfg

func NewCfg(opts []Option) Config

type Option

type Option func(*Config)

func WithContext

func WithContext(ctx context.Context) Option

func WithCreateDir

func WithCreateDir(perm any) Option

func WithCwd

func WithCwd(cwd string) Option

func WithErrorFile

func WithErrorFile(path string) Option

func WithExtension

func WithExtension(ext string) Option

func WithFirstPage

func WithFirstPage(page int) Option

func WithInputFile

func WithInputFile(path string) Option

func WithInputString

func WithInputString(input string) Option

func WithLastPage

func WithLastPage(page int) Option

func WithOutputFile

func WithOutputFile(path string) Option

Jump to

Keyboard shortcuts

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